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

Re: [PATCH] rebase -i: use same commit's message and date with f -C

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 23, 2025, 21:38 UTC
Message-ID
<xmqqldm4onma.fsf@gitster.g>
In-Reply-To
<92d4d585-09e9-4f1d-a471-1ad6b312fa61@app.fastmail.com>
"Mathias Rav" <m@git.strova.dk> writes:
> In `git rebase -i` with the fixup command, the -C flag controls whether
> the commit message is taken from the previous or current commit,
> but currently the author name, email and date are always taken from the
> previous commit.

As the name of the command says, you are fixing up the previous one, so I do not find it a problem if the credit for writing the resulting combined commit stays with the author of the previous one. The authorship information both covers the contents recorded in the commit's tree, as well as the commit message.

Granted, many commits of this project that is a one-liner change often have 50 lines of explanation in the commit log message, but still I think it is sensible to give more authorship credit to the author of the contents the tree of the final commit than to the author of the log message of the final commit.

> Change the behavior so that fixup with -C takes both message and author
> from the current commit, instead of taking the author from the previous.

I am somewhat negative to this change. I am perfectly fine to have a separate "I may have started from that previous one, but that was so broken that I essentially dismantled the original and replaced with the new one. It is better to attribute the credit to whoever did this last one that is replacing" command. But the "fixup" command people have been familiar with would be different, I would think.

Previous: Kristoffer HaugsbakkNext: Johannes Sixt
Message 6 of 14 in “rebase -i: use same commit's message and date with f -C”
  1. rebase -i: use same commit's message and date with f -CMathias Rav, Sep 23, 2025
  2. Karthik NayakSep 23, 2025
  3. Phillip WoodSep 23, 2025
  4. Ben KnobleSep 23, 2025
  5. Kristoffer HaugsbakkSep 23, 2025
  6. Junio C HamanoSep 23, 2025
  7. Johannes SixtSep 24, 2025
  8. Phillip WoodSep 24, 2025
  9. Mathias RavSep 24, 2025
  10. Phillip WoodSep 25, 2025
  11. Junio C HamanoSep 25, 2025
  12. Oswald BuddenhagenSep 24, 2025
  13. Junio C HamanoSep 24, 2025
  14. Phillip WoodSep 25, 2025

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.