From: Jeff King <peff@peff.net>
To: Ian Ward Comfort <icomfort@stanford.edu>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2] commit, status: #comment diff output in verbose mode
Date: Thu, 10 Mar 2011 17:52:33 -0500 [thread overview]
Message-ID: <20110310225233.GH15828@sigill.intra.peff.net> (raw)
In-Reply-To: <1299787140-21472-1-git-send-email-icomfort@stanford.edu>
On Thu, Mar 10, 2011 at 11:59:00AM -0800, Ian Ward Comfort wrote:
> By historical accident, diffs included in commit templates and status
> output when the "-v" option is given are not prefixed with the # comment
> character, as other advice and status information is. Stripping these
> lines is thus a best-effort operation, as it is not always possible to
> tell which lines were generated by "-v" and which were inserted by the
> user.
>
> Improve this situation by adding the # prefix to diff output along with
> all other status output in these cases. The change is simply made thanks
> to a3c158d (Add a prefix output callback to diff output, 2010-05-26). The
> prefixed diff can be stripped (or not, as configured) by the standard
> cleanup code, so our special verbose-mode heuristic can be removed.
>
> Documentation and a few tests which rely on the old "-v" format are
> updated to match. One known breakage is fixed in t7507.
One reason to keep the existing behavior is that editors will tend to
syntax-highlight the diff portion without much extra effort (in vim, at
least, the syntax highlighting just includes the diff syntax
highlighting for that section). I have no idea if this would make things
much harder for that case or not.
Even if it does make things harder there, I am not sure that the
increased robustness isn't more important, anyway. But I thought I would
point it out.
-Peff
next prev parent reply other threads:[~2011-03-10 22:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-10 19:59 [PATCH v2] commit, status: #comment diff output in verbose mode Ian Ward Comfort
2011-03-10 22:52 ` Jeff King [this message]
2011-03-10 23:57 ` SZEDER Gábor
2011-03-11 0:45 ` Junio C Hamano
2011-03-11 1:23 ` Jeff King
2011-03-11 5:31 ` Jeff King
2011-03-11 8:49 ` Michael J Gruber
2011-03-17 7:37 ` Jeff King
2011-03-17 8:01 ` Michael J Gruber
2011-03-17 19:41 ` Jeff King
2011-03-13 18:34 ` Piotr Krukowiecki
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=20110310225233.GH15828@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=icomfort@stanford.edu \
/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).