Commit 218dd85887da3d7d08119de18e9d325fcf30d7a4

Authored by Jean Delvare
Committed by Linus Torvalds
1 parent ea036230f7

.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.

Signed-off-by: Jean Delvare <>
Cc: Peter Zijlstra <>
Cc: Joe Perches <>
Cc: Jonathan Corbet <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

  1 +*.c diff=cpp
  2 +*.h diff=cpp