mirror of
https://gitlab.freedesktop.org/xorg/proto/xcbproto.git
synced 2025-12-20 03:30:24 +01:00
Add note on pretty patches and src/.gitattributes
Add a file HACKING describing howto to prettify patches (their hunk headers) and add src/.gitattributes, which is necessary for that. Signed-off-by: Daniel Martin <consume.noise@gmail.com> Reviewed-By: Ran Benita <ran234@gmail.com>
This commit is contained in:
parent
508a220f48
commit
2c024996d2
2 changed files with 21 additions and 0 deletions
20
HACKING
Normal file
20
HACKING
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
Make patches more descriptive
|
||||
=============================
|
||||
|
||||
By default hunk headers of a patch will look like this:
|
||||
|
||||
@@ -1227,6 +1227,8 @@ authorization from the authors.
|
||||
|
||||
Which is not very usefull as it doesn't give a hint where the change
|
||||
happened (except for the line number). To make those hunk headers more
|
||||
descriptive, i.e.:
|
||||
|
||||
@@ -1227,6 +1227,8 @@ <struct name="HierarchyChange">
|
||||
|
||||
Add these 2 lines to your .git/config file:
|
||||
|
||||
[diff "xcb"]
|
||||
xfuncname = "(<\\b(xcb|enum|event|request|struct|union)\\b.*>)"
|
||||
|
||||
For more background on this magic have a look at src/.gitattributes and
|
||||
the man page gitattributes(5) chapter "Defining a custom hunk-header".
|
||||
1
src/.gitattributes
vendored
Normal file
1
src/.gitattributes
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
*.xml diff=xcb
|
||||
Loading…
Add table
Reference in a new issue