[dpdk-dev] [PATCH] improve git diff

Thomas Monjalon thomas.monjalon at 6wind.com
Wed Nov 9 16:44:21 CET 2016


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 at 6wind.com>
---
 .gitattributes | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 .gitattributes

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



More information about the dev mailing list