Subject: Re: [RFC PATCH] git-add--interactive: manual hunk editing mode v2

From: Thomas Rast <[email-masked]>
Date: Mon, 9 Jun 2008 00:18:45 +0200

Johannes Schindelin wrote:
> 
> On Fri, 6 Jun 2008, Jeff King wrote:
> >   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").
> 
> This is very much on purpose.  I do not like "git add -i" at all.  It 
> limits my work unduly.  That's why I tried to change the hunk editing in 
> git-gui once upon a time, but I never got round to fix that, and it does 
> not work well with ssh either.
> 
> So no, I do not want to use that perl script with that menu.  I want to 
> have the raw diff in a raw editor, where I can change the things I need to 
> change.

While there is obviously little point in trying to convince you, let
me briefly explain why I still think it is useful:

I usually run 'add -p' instead of adding specific files.  "Nodding
off" each hunk means that I get a last chance to review my changes,
and perhaps skip some of them (possibly for a later commit).  With my
proposed editing feature, I can split hunks in the middle too.  You
could of course argue that the right way to do this would be staring
at 'git diff', or perhaps scrolling through the entire patch in your
'add -e'.  I just got used to doing the reviews during 'add -p'.  As
Jeff said, by the time I decide to change a hunk, I might already be
halfway through the decisions and _definitely_ don't want to bail out
and restart with 'add -e'.

That, and my Maple worksheets have a tendency to show up when I didn't
want to commit them, so I can just say 'd' there.

- Thomas

-- 
Thomas Rast
[email-masked]