Re: [PATCH] git-add -p: be able to undo a given hunk

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

 



On Fri, Jul 24, 2009 at 01:06:22PM -0400, Jeff King wrote:
> On Fri, Jul 24, 2009 at 09:06:16AM -0700, Junio C Hamano wrote:
> 
> > In your arsenal, you have "git add -p" to help you sift good pieces from
> > other parts in finer grained manner, instead of having to make an all or
> > nothing decision per file basis (i.e. "git add file").  But "git add -p"
> > (and "git add -i") is still about the "git add" step in the above high
> > level view.  You have a mixture of good and not so good changes in your
> > work tree, and you pick only good pieces to add to the index, _knowing_
> > that you can go back and redo this step safely exactly because your work
> > tree will stay the same even if you did make mistakes.
> > 
> > The proposed change breaks this expectation you would have naturally
> > gained during the course of becoming more and more proficient in using
> > git.
> > 
> > In other words, I do not think you can say that the change will not harm
> > the experts due to both the points 2 (experts can easily make typo) and 3
> > above (the change breaks the mental model of the world experts would have
> > formed).
> > 
> > Having said all that, it indeed would be useful to selectively revert
> > changes from the work tree files.
> 
> Perhaps it makes sense to have an interactive stash rather than an
> interactive revert?

Very cool idea, it's even better than creating a revert patch.

Note that to undermine the "dirty stash list" effect we could have
quite easily different stash queues if it's badly needed, so it sounds
like a moot point to me.
-- 
Intersec <http://www.intersec.com>
Pierre Habouzit <pierre.habouzit@xxxxxxxxxxxx>
Tél : +33 (0)1 5570 3346
Mob : +33 (0)6 1636 8131
Fax : +33 (0)1 5570 3332
37 Rue Pierre Lhomme
92400 Courbevoie

Attachment: signature.asc
Description: Digital signature


[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]