Re: feature request: git add--interactive --patch on regex-matched hunks only
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Jul 27, 2011, 09:02 UTC
- Message-ID
- <CACsJy8ByDUByZiX43_+4_49uB+h0AMCk9J+35kZJSKgBn2KZbA@mail.gmail.com>
- In-Reply-To
- <20110727081034.GB8105@sigill.intra.peff.net>
On Wed, Jul 27, 2011 at 3:10 PM, Jeff King <peff@peff.net> wrote:
Show 12 quoted lines
> I'm not sure how useful "log --hunks" would be. The changes you commit > don't tend to be that big (well, not if you're doing it right). It seems > much more likely to have the case you brought up, which is that some > file has a bunch of boring boilerplate that doesn't need to be > changed, and you need to pick out the interesting changes from the > boilerplate changes. > > I suppose if somebody committed all of the boilerplate changes (like .po > comment changes), then you would want to be able to pick them apart. But > that just seems like the wrong thing (i.e., if those comments really are > uninteresting, they should not be committed). But I don't work with .po > files at all, so maybe there is a good reason to commit them.
I was thinking of it as an extension of "git log -Sregex", where as -S shows full diff of matched files, the new option only shows hunks that actually match. Not sure if that is really useful though. On the other hand, "git diff --hunk" is useful for me, I'll see if I can add that option.
-- Duy