Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1478254 > unrolled thread

[PATCH] Set git diff driver for C source code files

Started byJean Delvare <jdelvare@suse.de>
First post2016-09-07 14:40 +0200
Last post2016-09-07 14:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] Set git diff driver for C source code files Jean Delvare <jdelvare@suse.de> - 2016-09-07 14:40 +0200

#1478254 — [PATCH] Set git diff driver for C source code files

FromJean Delvare <jdelvare@suse.de>
Date2016-09-07 14:40 +0200
Subject[PATCH] Set git diff driver for C source code files
Message-ID<seKj0-8cn-7@gated-at.bofh.it>
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 <jdelvare@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Joe Perches <joe@perches.com>
Cc: Jonathan Corbet <corbet@lwn.net>
---
 .gitattributes |    2 ++
 1 file changed, 2 insertions(+)

--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-4.7/.gitattributes	2016-09-07 14:07:23.042138220 +0200
@@ -0,0 +1,2 @@
+*.c   diff=cpp
+*.h   diff=cpp


-- 
Jean Delvare
SUSE L3 Support

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web