From: Jeff King <peff@peff.net>
To: Petr Sebor <petr@scssoft.com>
Cc: Alex Riesen <raa.lkml@gmail.com>, git@vger.kernel.org
Subject: Re: git diff - no newline after @@ ?
Date: Fri, 18 Aug 2006 08:44:28 -0400 [thread overview]
Message-ID: <20060818124428.GA22328@sigio.intra.peff.net> (raw)
In-Reply-To: <44E5B496.3070901@scssoft.com>
On Fri, Aug 18, 2006 at 02:37:42PM +0200, Petr Sebor wrote:
> >>has anyone noticed that the 'git diff' output somehow lacks the newline
> >>after the @@ tag?
> >Why should it? It's hunk comment.
> Hunk comment? Maybe we don't understand each other...
The intent of a hunk comment is to give the user some context. Note how
it's usually the C function name, even if the declaration of that
function isn't the line right before the context lines?
> check another example:
>
> --- a/include/linux/kernel.h
> +++ b/include/linux/kernel.h
> @@ -13,6 +13,7 @@ #include <linux/stddef.h>
> #include <linux/types.h>
> #include <linux/compiler.h>
> #include <linux/bitops.h>
> +#include <linux/memleak.h>
> #include <asm/byteorder.h>
> #include <asm/bug.h>
The function detection is very simple (I believe it just looks for the
closest preceding line without any prior whitespace).
> whereas gnu diff would output
Try diff -p to get a hunk comment.
-Peff
next prev parent reply other threads:[~2006-08-18 12:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-18 12:10 git diff - no newline after @@ ? Petr Sebor
2006-08-18 12:25 ` Alex Riesen
2006-08-18 12:37 ` Petr Sebor
2006-08-18 12:40 ` Jakub Narebski
2006-08-18 12:44 ` Jeff King [this message]
2006-08-18 13:19 ` Petr Sebor
2006-08-18 13:42 ` Jakub Narebski
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=20060818124428.GA22328@sigio.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=petr@scssoft.com \
--cc=raa.lkml@gmail.com \
/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).