batman-adv: set git diff driver for C source code files
PATCH 1/1 batman-adv: set git diff driver for C source code files
From: Jean Delvare <[email protected]>
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.
--- .gitattributes | 2 ++ 1 file changed, 2 insertions(+)
.gitattributes +2 -0
@@ -1,2 +1,4 @@ /.gitignore export-ignore /.gitattributes export-ignore +*.c diff=cpp +*.h diff=cpp
Signature · 1 line
2.11.0
Sven Eckelmann
AppliedQuoted 11 lines · On Dienstag, 21. Februar 2017 10:06:40 CET Sven Eckelmann wrote:
From: Jean Delvare <[email protected]>
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 <[email protected]>[[email protected]: Ported patch from linux.git]Signed-off-by Sven Eckelmann <[email protected]>---
Applied in e3bab02816097f860545d9ce9ae0808c69d7c92f [1].
Kind regards,
Sven
[1] https://git.open-mesh.org/batman-adv.git/commit/e3bab02816097f860545d9ce9ae0808c69d7c92f