Re: [RFC PATCH] git-add--interactive: manual hunk editing mode v2
- From
Jeff King <peff@peff.net>
- Date
- Jun 6, 2008, 05:10 UTC
- Message-ID
- <20080606051026.GA18257@sigill.intra.peff.net>
- In-Reply-To
- <alpine.DEB.1.00.0806051126060.21190@racer>
On Thu, Jun 05, 2008 at 11:28:53AM +0100, Johannes Schindelin wrote:
Show 5 quoted lines
> We have a tradition of giving the users plenty of rope. > > And I actually like having the power at my finger tips. You would not > believe how I enjoyed using "git add -e" to commit the final version of > that very patch.
I looked at your patch, and here are my complaints (versus what Thomas has been working on):
1. You edit the whole diff, not just a hunk. Actually, I think this is
probably not a big deal, as any decent editor lets you find the
spot you're looking for pretty trivially. 2. It's not integrated into the git-add--interactive loop at all. That
is, I don't start out saying "I want to edit this diff." I look at
the diff while staging with "git add -p" and say "Oops, I need to
edit this hunk." So I think it is better implemented as an "e"
option in the hunk adding loop, with "git add -e" as a shortcut.
Or maybe there is simply room for both (and "git add -e", rather
than being a shortcut, just means "do this on the _whole_ file").-Peff