Subject: [PATCH v4 0/5] Re: {checkout,reset,stash} --patch

From: Nicolas Sebrecht <[email-masked]>
Date: Sun, 9 Aug 2009 18:32:33 +0200

The 09/08/09, Thomas Rast wrote:
> Jeff King wrote:
> > 
> > Shouldn't the diff be reversed? That is, I think what users would like
> > to see is "bring this hunk over from the index to the working tree". But
> > we have the opposite (a hunk that is in the working tree that we would
> > like to undo).
> 
> Well, my thinking for the initial (restricted; you couldn't say 'git
> checkout -p HEAD~14') version went something like this: 'reset -p'
> should be the opposite of 'add -p', so it offers the same hunks with
> the question "Reset?".  Then 'checkout -p' should somehow follow suit,
> but asked "Discard?" (IIRC I even had it in all caps).

I agree this approach is fine. That said, I admit I've been confused at
the beginning. FMPOV, asking "Discard this hunk?" is a real improvement.

In the same way I'd change "Reset?" of 'git reset -p' to "Unstage?".
Otherwise, the end-user don't know if the command will discard the hunk
from the WT too.

Also, I'd expect to have 'git reset --hard -p' discarding hunks from
both the index and the WT (which is not possible for now unless I missed
something).

-- 
Nicolas Sebrecht