summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Martin <consume.noise@gmail.com>2013-10-13 13:44:37 +0200
committerArnaud Fontaine <arnau@debian.org>2013-11-14 20:23:24 +0900
commit2c024996d2ecccedcc41607e64d95862a08ba0dc (patch)
treee27d69670c9a11db7081b5dd7a4efc70ccc67ef9
parent508a220f48ee1f58cb4ab10c63dbeab2e4346e86 (diff)
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>
-rw-r--r--HACKING20
-rw-r--r--src/.gitattributes1
2 files changed, 21 insertions, 0 deletions
diff --git a/HACKING b/HACKING
new file mode 100644
index 0000000..e954a76
--- /dev/null
+++ b/HACKING
@@ -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".
diff --git a/src/.gitattributes b/src/.gitattributes
new file mode 100644
index 0000000..8d345b0
--- /dev/null
+++ b/src/.gitattributes
@@ -0,0 +1 @@
+*.xml diff=xcb