[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: Thomas Rast <trast () student ! ethz ! ch>
Date: 2009-07-25 9:35:31
Message-ID: 200907251135.33164.trast () student ! ethz ! ch
[Download RAW message or body]
Junio C Hamano wrote:
>
> Yeah, such a stash entry would be more like "trash can". It is not
> "to-be-deleted" but "have been deleted, but you _could_ resurrect".
>
> It may not be a bad idea to do it that way, or perhaps "git checkout -p"
> can automatically create such a trash can while undoing the local changes
> in the work tree.
I'd rather implement this as part of the generic "worktree/index log"
that was proposed a while back, where any index- or
worktree-overwriting operation that actually discards data would save
the lost state in a special reflog. That way people won't complain
because 'git checkout -p -- $file' <press a> saved their state, but
'git checkout -- $file' didn't, even though they should be equivalent.
--
Thomas Rast
trast@{inf,student}.ethz.ch
--
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