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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]