From e82675a040d559c56be54255901138a979eeec21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Thu, 7 Jul 2016 22:11:50 +0200 Subject: .gitattributes: set file type for C files Set the diff attribute for C source file to "cpp" in order to improve git's ability to determine hunk headers. In particular it helps avoid showing unindented labels in hunk headers. That in turn is useful for git diff -W and git grep -W, which show whole functions now instead of stopping at a label. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.gitattributes') diff --git a/.gitattributes b/.gitattributes index 5e98806c6c..320e33c327 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,3 @@ * whitespace=!indent,trail,space -*.[ch] whitespace=indent,trail,space +*.[ch] whitespace=indent,trail,space diff=cpp *.sh whitespace=indent,trail,space -- cgit v1.2.3