mirror of
https://github.com/nginx/nginx.git
synced 2026-05-13 09:36:42 +00:00
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.
E.g. get
@@ -10,7 +10,7 @@ int foo(void)
instead of
@@ -10,7 +10,7 @@ again:
This has the same effect as adding
[diff "default"]
xfuncname = "^[[:alpha:]$_].*[^:]$"
to your git config file.
This makes use of the gitattributes(5) infrastructure.
This commit is contained in:
parent
c52c5698cd
commit
23f43f1abf
1 changed files with 1 additions and 0 deletions
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
*.[ch] diff=cpp
|
||||
Loading…
Add table
Add a link
Reference in a new issue