git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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).

Previous: Michael J GruberNext: Michael J Gruber
Message 11 of 14 in “[BUG] git mangles up commit messages on rebase”
  1. Christoph Anton MittererFeb 21, 2015
  2. sequencer: preserve commit messagesMichael J Gruber, Feb 23, 2015
  3. Junio C HamanoFeb 23, 2015
  4. Michael J GruberFeb 24, 2015
  5. Junio C HamanoFeb 24, 2015
  6. Michael J GruberFeb 25, 2015
  7. Junio C HamanoFeb 25, 2015
  8. Michael J GruberFeb 26, 2015
  9. Junio C HamanoFeb 26, 2015
  10. Michael J GruberFeb 27, 2015
  11. Junio C HamanoFeb 27, 2015
  12. [PATCHv2] sequencer: preserve commit messagesMichael J Gruber, Mar 6, 2015
  13. Junio C HamanoMar 6, 2015
  14. Christoph Anton MittererFeb 25, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.