All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Mark Wooding <mdw@distorted.org.uk>
Cc: git@vger.kernel.org, "Peter Eriksen" <s022018@student.dtu.dk>
Subject: Re: [PATCH] Documentation: --amend cannot be combined with -c/-C/-F.
Date: Thu, 25 Jan 2007 14:21:47 -0800	[thread overview]
Message-ID: <7vodom9284.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <slrnerh8la.7v0.mdw@metalzone.distorted.org.uk> (Mark Wooding's message of "Thu, 25 Jan 2007 12:29:30 +0000 (UTC)")

Mark Wooding <mdw@distorted.org.uk> writes:

> Currently -c (copy some other commit message, and then edit it) is
> considered to be a `force message to be...' kind of option, like the
> others I've listed above.
>
> So, for some reason, is --amend.  This last is really annoying.

I think the mindset is a bit different.  The -C/-c options are
about the latter half of cherry-picking.  The user asks "reuse
the message from an existing commit so that I do not have to
type", or "I could reuse the original log message almost as-is,
but I am using the change in a slightly different context from
the original commit (and that is why cherry-pick did not finish
by itself and you need to run git-commit after fixing up), so I
would need to talk a bit about what I did in the fix-up in the
log message".  Both are useful.

Amend is conflated -- you are amending what you did, either
perhaps you found a small typo in the code in which case the
difference between what is being amended and what will be
committed may only be the tree and you would want to re-use an
existing message as-is, or you found a small typo in the log
message in which case there won't be any difference in the trees
but you do want to spellfix the log message, or you may be
fixing both.

We happen default to the edit behaviour for no particular
reason, other than "because :q or C-x # are cheap".

Unfortunatly there is no good default for this case -- fixing
tree and fixing message are both almost equally often used in
the real world, so changing --amend not to let you edit by
default and adding --edit option would inconvenience other use
case.

Adding --no-edit option is not very nice either.  It's almost as
cumbersome to type as "EDITOR=:".

What you want might be an --amend-tree option; it would be to
the --amend option what the -C (--reuse-message) option is to
the -c (--reedit-message).

  reply	other threads:[~2007-01-25 22:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-24 19:54 [PATCH] Documentation: --amend cannot be combined with -c/-C/-F Peter Eriksen
2007-01-25 12:29 ` Mark Wooding
2007-01-25 22:21   ` Junio C Hamano [this message]
2007-01-25 22:38     ` Matthias Lederhofer

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=7vodom9284.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=mdw@distorted.org.uk \
    --cc=s022018@student.dtu.dk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.