Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: David Kastrup <dak@gnu.org>
Cc: git@vger.kernel.org
Subject: Re: git-commit --amend -m "..." complains?!?
Date: Wed, 01 Aug 2007 12:52:50 -0700	[thread overview]
Message-ID: <7vk5sf3uct.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <85myxbrrdl.fsf@lola.goethe.zz> (David Kastrup's message of "Wed, 01 Aug 2007 21:23:18 +0200")

David Kastrup <dak@gnu.org> writes:

> Junio C Hamano <gitster@pobox.com> writes:
> ...
>> You can do:
>>
>> 	$ git reset HEAD^
>>         $ git commit -m "blah"
>>
>> if you do not want to reuse the commit message.
>
> You can pretty much _always_ avoid --amend in a similar manner, but
> why would you?  It is convenient.

No need to be upset about what I said.  I really do not want to
change the minor detail this late in the 1.5.3 release cycle,
and wanted to unblock you by giving an workaround in case you
were stuck.

It should be a straightforward change to git-commit.sh.  Instead
of "Oops, -m and --amend are incompatible so we will whine"
around line 300, you can treat --amend somewhat specially by (1)
making it first not set log_given, which would still keep the
combination of -m/-c/-C/-F incompatible, (2) when $log_given is
false and we are amending, honor $use_commit to prime the
message.  Then you can keep the current bahaviour for amending
starting from the existing message, while allowing -m/-c/-C/-F
to supply different message for the replacing commit.

  reply	other threads:[~2007-08-01 19:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-01 14:25 git-commit --amend -m "..." complains?!? David Kastrup
2007-08-01 17:18 ` Junio C Hamano
2007-08-01 19:23   ` David Kastrup
2007-08-01 19:52     ` Junio C Hamano [this message]
2007-08-01 20:45       ` David Kastrup
2007-08-01 20:33         ` [PATCH] git-commit.sh: Permit the --amend message to be given with -m/-c/-C/-F David Kastrup
2007-08-02  1:03           ` Junio C Hamano

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=7vk5sf3uct.fsf@assigned-by-dhcp.cox.net \
    --to=gitster@pobox.com \
    --cc=dak@gnu.org \
    --cc=git@vger.kernel.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