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

Re: using oldest date when squashing commits

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 24, 2023, 17:30 UTC
Message-ID
<xmqqpm143p46.fsf@gitster.g>
In-Reply-To
<138631cd-ead3-4f22-95ce-61afccfa409f@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 12 quoted lines
>>> Unfortunately "fixup -C" only copies the commit message not the
>>> authorship
>> 
>>> (that's usually a good thing
>>>
>> why? what would that be useful for?
>> it seems rather counter-intuitive.
>
> In the same way that you do not want to change the author date when
> using a fixup to move a small hunk from one commit to another most
> users do not want to update the author information when they make a
> small change to a commit message using "fixup -C"
Exactly.

It would be OK to add "fixup -c --reset-author", but the default should stay. In addition, I wouldn't be able to use "rebase -i" to make typofixes to commits made out of received patches if the operation changes the authorship.

> "fixup -c/-C" were conceived as a way to reword a commit message at
> the same time as optionally fixing up the commit's content.

Yup, it still is a "fix", meaning the identity and the spirit of the commit being fixed are unchanged. What it aims to achieve, how it implements the behaviour it wants to give its users, who thought of that change, all that are the same as the original. It may be a nice addition to optionally allow users to use --reset-author (or better yet, --author="Na Me <a@dd.re.ss>") with "fixup", but if the "-c" variant can be concluded with "commit --amend --reset-author" to achieve the same effect, that may be sufficient.

Thanks.
Previous: Phillip WoodNext: Oswald Buddenhagen
Message 7 of 15 in “using oldest date when squashing commits”
  1. Oswald BuddenhagenMar 19, 2022
  2. Johannes SixtMar 20, 2022
  3. Oswald BuddenhagenMar 20, 2022
  4. Phillip WoodOct 24, 2023
  5. Oswald BuddenhagenOct 24, 2023
  6. Phillip WoodOct 24, 2023
  7. Junio C HamanoOct 24, 2023
  8. Oswald BuddenhagenOct 24, 2023
  9. Johannes SixtOct 24, 2023
  10. Marc BranchaudOct 27, 2023
  11. Oswald BuddenhagenOct 27, 2023
  12. Marc BranchaudOct 27, 2023
  13. Oswald BuddenhagenOct 27, 2023
  14. Marc BranchaudOct 27, 2023
  15. Junio C HamanoOct 27, 2023

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.