From: Boaz Harrosh <bharrosh@panasas.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Git Mailing List <git@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] .gitattributes: Enable cpp diff parsing for .[ch] files
Date: Thu, 25 Aug 2011 15:37:03 -0700 [thread overview]
Message-ID: <4E56CE8F.8080501@panasas.com> (raw)
The Linux Kernel source tree is certainly a C language repository.
As a maintainer and code reviewer I would like too, for example:
See function names as hunk headers and not goto labels. And all
the other goodies a language specific diff parser gives me.
Add a .gitattributes file to the Linux tree to enable cpp parsing
of the source files.
People are welcome to add other parsers for other type of files
if needed. (Like Makefile or Kconfig ...)
CC: Jeff King <peff@peff.net>
CC: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
---
.gitattributes | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
create mode 100644 .gitattributes
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..6d2b620
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+*.h diff=cpp
+*.c diff=cpp
--
1.7.6
next reply other threads:[~2011-08-25 22:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-25 22:37 Boaz Harrosh [this message]
2011-08-26 20:27 ` [PATCH] .gitattributes: Enable cpp diff parsing for .[ch] files Linus Torvalds
2011-08-26 20:54 ` Junio C Hamano
2011-08-26 20:59 ` Linus Torvalds
2011-08-26 20:55 ` Boaz Harrosh
2011-08-29 13:32 ` Peter Zijlstra
2011-08-29 20:57 ` Boaz Harrosh
2011-08-29 21:30 ` Peter Zijlstra
2011-08-29 22:02 ` Linus Torvalds
2011-08-29 22:43 ` Boaz Harrosh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E56CE8F.8080501@panasas.com \
--to=bharrosh@panasas.com \
--cc=akpm@linux-foundation.org \
--cc=git@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).