Re: [PATCH] git-add--interactive: Preserve diff heading when splitting hunks
- From
Jeff King <peff@peff.net>
- Date
- May 12, 2014, 21:12 UTC
- Message-ID
- <20140512211235.GA4705@sigill.intra.peff.net>
- In-Reply-To
- <xmqqvbtapuyk.fsf@gitster.dls.corp.google.com>
On Mon, May 12, 2014 at 02:07:15PM -0700, Junio C Hamano wrote:
Show 8 quoted lines
> > 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