From: Nikolaj Schumacher <n_schumacher@web.de>
To: Alexandre Julliard <julliard@winehq.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git.el: Don't reset HEAD in git-amend-file.
Date: Thu, 26 Jun 2008 22:17:16 +0200 [thread overview]
Message-ID: <m2y74symr7.fsf@nschum.de> (raw)
In-Reply-To: <87tzfg7gd5.fsf@wine.dyndns.org> (Alexandre Julliard's message of "Thu\, 26 Jun 2008 10\:25\:10 +0200")
Alexandre Julliard <julliard@winehq.org> wrote:
> Nikolaj Schumacher <n_schumacher@web.de> writes:
>
>> 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.
You're right, it would be less powerful. But I still think it maps
better to what "git commit --amend" does, i.e. do a few changes and
amend them. No need for diffing against the old head, or even showing
it in the summary. For doing something more complicated I would reset
head, too. So, yes, the command should exist as well. But I'm not
so sure about the name...
As an aside, the current method doesn't work on the initial commit.
regards,
Nikolaj Schumacher
prev parent reply other threads:[~2008-06-26 20:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-21 22:27 [PATCH] git.el: Don't reset HEAD in git-amend-file Nikolaj Schumacher
2008-06-26 8:25 ` Alexandre Julliard
2008-06-26 20:17 ` Nikolaj Schumacher [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2y74symr7.fsf@nschum.de \
--to=n_schumacher@web.de \
--cc=git@vger.kernel.org \
--cc=julliard@winehq.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).