Re: [PATCH] git-add -p: be able to undo a given hunk
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 25, 2009, 00:54 UTC
- Message-ID
- <7v1vo537m0.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20090724170622.GA20247@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
> Perhaps it makes sense to have an interactive stash rather than an > interactive revert? Then the reverts that you make are still being saved > somewhere, and you can recover from an error by applying the stash. Not > to mention that interactive stash is useful in its own right. > > The downside is that if you are the sort of person who keeps a clean > stash list (and I am not such a person), then you have this > "to-be-deleted" cruft on the top of your stash (whereas with a true > revert, it just goes away).
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.