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

How dangerous is --committer-date-is-author-date these days?

From
Johannes Sixt <j6t@kdbg.org>
Date
Sep 28, 2024, 06:59 UTC
Message-ID
<6af09726-e3bf-4903-87ae-9524ad334678@kdbg.org>

The option --committer-date-is-author-date of git-rebase rewrites the committer dates like its name suggests. It is not uncommon that commits are rearranged and cherry-picked. Then, as a consequence, author dates are not decreasing when walking back in history. Now, if such a history with a non-monotonic author date is rebased one final time with --committer-date-is-author-date, this creates a history with non-monotonic committer dates. I recall that this is not a good thing to have since it can confuse our history walker.

- Why do we have --committer-date-is-author-date in a porcelain command?
- Should we remove it?
- Should we require an explicit --force instead of implying it?
- Should we issue a big warning about the consequences?

Here is the discussion that introduced the option git-rebase: rebase -i: support --committer-date-is-author-date https://lore.kernel.org/git/20200817174004.92455-4-phillip.wood123@gmail.com/

I am asking this here after I have participated in this Stackoverflow question, where git rebase --committer-date-is-author-date was suggested as a solution to "rewrite name and email, but not timestamps". https://stackoverflow.com/questions/79024409

-- Hannes
Next: Phillip Wood
Message 1 of 25 in “How dangerous is --committer-date-is-author-date these days?”
  1. Johannes SixtSep 28, 2024
  2. Phillip WoodSep 28, 2024
  3. Phillip WoodSep 28, 2024
  4. Kristoffer HaugsbakkSep 30, 2024
  5. Junio C HamanoSep 30, 2024
  6. SZEDER GáborOct 8, 2025
  7. doc: warn against --committer-date-is-author-datekristofferhaugsbakk@fastmail.com, Oct 8, 2025
  8. Phillip WoodOct 9, 2025
  9. Kristoffer HaugsbakkOct 9, 2025
  10. Kristoffer HaugsbakkOct 9, 2025
  11. Junio C HamanoOct 9, 2025
  12. Kristoffer HaugsbakkOct 9, 2025
  13. Junio C HamanoOct 9, 2025
  14. Kristoffer HaugsbakkOct 9, 2025
  15. Johannes SixtOct 11, 2025
  16. Kristoffer HaugsbakkOct 16, 2025
  17. Kristoffer HaugsbakkOct 16, 2025
  18. Johannes SixtOct 16, 2025
  19. Kristoffer HaugsbakkOct 16, 2025
  20. Junio C HamanoOct 16, 2025
  21. Kristoffer HaugsbakkNov 19, 2025
  22. doc: warn against --committer-date-is-author-datekristofferhaugsbakk@fastmail.com, Nov 20, 2025
  23. Johannes SixtNov 20, 2025
  24. Phillip WoodNov 26, 2025
  25. Kristoffer HaugsbakkNov 27, 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.