diff options
author | Jean Delvare <[email protected]> | 2016-10-07 17:03:04 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2016-10-07 18:46:30 -0700 |
commit | 218dd85887da3d7d08119de18e9d325fcf30d7a4 (patch) | |
tree | 0753355904c0b5a1a174e5c43b2680e105bf9afb | |
parent | ea036230f7c604e3c90fbf57f4643bd733034af9 (diff) |
.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 <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | .gitattributes | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000000..89c411b5ce6b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.c diff=cpp +*.h diff=cpp |