From: Jean Delvare Date: Sat, 8 Oct 2016 00:03:04 +0000 (-0700) Subject: .gitattributes: set git diff driver for C source code files X-Git-Tag: v4.9-rc1~73^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=218dd85887da3d7d08119de18e9d325fcf30d7a4;p=platform%2Fkernel%2Flinux-exynos.git .gitattributes: set git diff driver for C source code files 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. Link: http://lkml.kernel.org/r/20160907143403.1449324f@endymion Signed-off-by: Jean Delvare Cc: Peter Zijlstra Cc: Joe Perches Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..89c411b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.c diff=cpp +*.h diff=cpp