Re: [PATCH] sequencer: preserve commit messages
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 27, 2015, 18:31 UTC
- Message-ID
- <xmqqd24vjjf0.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <54F08DE8.3080907@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
Show 8 quoted lines
> 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).