Subject: Re: [PATCH] sequencer: preserve commit messages

From: Junio C Hamano <[email-masked]>
Date: Fri, 27 Feb 2015 10:31:15 -0800

Michael J Gruber <[email-masked]> 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).