improve git diff
authorThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 9 Nov 2016 15:37:58 +0000 (16:37 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 13 Nov 2016 14:25:12 +0000 (15:25 +0100)
Sometimes git does not print the name of the function being changed
after @@. It happens especially after a goto label which is not indented.
Giving a hint about the languages of files .c, .h and .py
will improve hunk headers of "git diff" rendering.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
.gitattributes [new file with mode: 0644]

diff --git a/.gitattributes b/.gitattributes
new file mode 100644 (file)
index 0000000..fe555f8
--- /dev/null
@@ -0,0 +1,3 @@
+*.c   diff=cpp
+*.h   diff=cpp
+*.py  diff=python