public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Michael J Gruber <git@drmicha•warpmail.net>
Cc: git@vger•kernel.org, Christoph Anton Mitterer <calestyo@scientia•net>
Subject: Re: [PATCH] sequencer: preserve commit messages
Date: Fri, 27 Feb 2015 10:31:15 -0800	[thread overview]
Message-ID: <xmqqd24vjjf0.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <54F08DE8.3080907@drmicha.warpmail.net> (Michael J. Gruber's message of "Fri, 27 Feb 2015 16:31:52 +0100")

Michael J Gruber <git@drmicha•warpmail.net> writes:

> Without any config being set the result is certainly what I'm after.
>
> What I'm still wondering about is the case without --edit but with
> commit.cleanup: It seems to me that "git commit" being involved in a
> conflict-less cherry-pick is solely an implemention detail (and it could
> be done differently). Applying commit.* in this situation is a total
> surpise to the normal user, isn't it? I mean, again, what's the
> difference to rebase from a user perspective?

OK, a revised logic with the above input from you may look like
this:

     #if IN_THE_FUTURE
         if (config_exists(cherrypick.cleanup))
             mode = config_value(cherrypick.cleanup);
         else
     #endif
         if (editing && config_exists(commit.cleanup))
             mode = config_value(commit.cleanup);
         else
             mode = 'verbatim';
 
         invoke "commit --cleanup=" + mode;

This is a change in behavoiur (I just checked with v1.6.0 codebase
and we seem to run a clean-up without "--edit"); what is our plan to
help those who have been relying on the auto clean-up behaviour?

Also a tangent.

I recently run "cherry-pick -s" on two commits, and I am not sure if
"with --edit, and only with -edit, do the usual clean-up" is a
sensible thing to do, or "-s" or any other option should trigger the
usual clean-up if it implies that the user understands and asks the
log message to be different from the original (I am leaning towards
the latter).

  reply	other threads:[~2015-02-27 18:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-21 17:48 [BUG] git mangles up commit messages on rebase Christoph Anton Mitterer
2015-02-23 13:23 ` [PATCH] sequencer: preserve commit messages Michael J Gruber
2015-02-23 18:54   ` Junio C Hamano
2015-02-24 15:29     ` Michael J Gruber
2015-02-24 18:29       ` Junio C Hamano
2015-02-25  9:50         ` Michael J Gruber
2015-02-25 18:22           ` Junio C Hamano
2015-02-26 11:05             ` Michael J Gruber
2015-02-26 19:49               ` Junio C Hamano
2015-02-27 15:31                 ` Michael J Gruber
2015-02-27 18:31                   ` Junio C Hamano [this message]
2015-03-06 13:55                     ` [PATCHv2] " Michael J Gruber
2015-03-06 18:59                       ` Junio C Hamano
2015-02-25 13:44         ` [PATCH] " Christoph Anton Mitterer

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=xmqqd24vjjf0.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=calestyo@scientia$(echo .)net \
    --cc=git@drmicha$(echo .)warpmail.net \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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