From: Jean Delvare jdelvare@suse.de
Git can be told to apply language-specific rules when generating diffs. Enable this for C source code files (*.c and *.h) so that function names are printed right. Specifically, doing so prevents "git diff" from mistakenly considering unindented goto labels as function names.
Signed-off-by: Jean Delvare jdelvare@suse.de [sven@narfation.org: Ported patch from linux.git] Signed-off-by: Sven Eckelmann sven@narfation.org --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/.gitattributes b/.gitattributes index eeef3e0..1d2a7e9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,4 @@ /.gitignore export-ignore /.gitattributes export-ignore +*.c diff=cpp +*.h diff=cpp