Re: [PATCH] git.el: Don't reset HEAD in git-amend-file.
- From
- Alexandre Julliard <julliard@winehq.org>
- Date
- Jun 26, 2008, 08:25 UTC
- Message-ID
- <87tzfg7gd5.fsf@wine.dyndns.org>
- In-Reply-To
- <m2myle77bb.fsf@nschum.de>
Nikolaj Schumacher <n_schumacher@web.de> writes:
Show 5 quoted lines
> The current implementation of git-amend-file is a little dangerous. > While git --amend is atomic, git-amend-file is not. > > If the user calls it, but doesn't go through with the commit (due to > error or choice), git --reset HEAD^ has been called anyway.
That's a feature, even if it's a little dangerous. You have to reset HEAD to be able to properly do diffs, refreshes, etc. Maybe there should be an easier way to redo the commit if you change your mind, but the command would be much less useful without the reset.
-- Alexandre Julliard julliard@winehq.org