From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] git-add--interactive: Preserve diff heading when splitting hunks
Date: Mon, 12 May 2014 17:12:35 -0400 [thread overview]
Message-ID: <20140512211235.GA4705@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqvbtapuyk.fsf@gitster.dls.corp.google.com>
On Mon, May 12, 2014 at 02:07:15PM -0700, Junio C Hamano wrote:
> > And figuring out "B" here
> > would be prohibitively difficult, I would think, as it would require
> > applying the funcname rules internal to git-diff to a hunk that git-diff
> > itself never actually sees.
>
> You can actually apply a split hunk being proposed to a temporary
> file and then ask "git diff" about it, so I do not think difficult
> is too much of an issue,
True, I didn't think of that.
> but I doubt we would want to see header_B,
> exactly because when the user says "Split this hunk", s/he is very
> well aware that the second one is artificial and was split from the
> original hunk whose header said header_A.
Right, that's along the lines of the "you could make the argument" I was
thinking of. Since you are thinking it, too, I'm definitely in favor of
stopping at Ævar's patch and seeing if anybody even notices or
complains.
Thanks.
-Peff
prev parent reply other threads:[~2014-05-12 21:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-11 16:09 [PATCH] git-add--interactive: Preserve diff heading when splitting hunks Ævar Arnfjörð Bjarmason
2014-05-11 17:52 ` Junio C Hamano
2014-05-12 18:39 ` Jeff King
2014-05-12 19:42 ` Ævar Arnfjörð Bjarmason
2014-05-12 20:09 ` Jeff King
2014-05-12 21:07 ` Junio C Hamano
2014-05-12 21:12 ` Jeff King [this message]
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=20140512211235.GA4705@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).