[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: [PATCH] git-add -p: be able to undo a given hunk
From:       Pierre Habouzit <madcoder () madism ! org>
Date:       2009-07-25 14:48:03
Message-ID: 20090725144803.GA18545 () artemis ! corp
[Download RAW message or body]

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@intersec.com>
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

["signature.asc" (application/pgp-signature)]
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic