Re: [PATCH] doc: warn against --committer-date-is-author-date
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 9, 2025, 21:41 UTC
- Message-ID
- <xmqqo6qfda78.fsf@gitster.g>
- In-Reply-To
- <3a8dfd13-982d-4c83-b675-1e9a63bb6ab0@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
>> You should only use >> + this option to lie about the committer date when applying > > s/lie/override/ ?
It cannot be "fixing an earlier mistake by overriding the correct data". It is deliberately using a data that does not match the reality to replace what was recorded, so in this case, "lie" would be the proper characterization, I would think.
Show 18 quoted lines
>> --committer-date-is-author-date:: >> - Instead of using the current time as the committer date, use >> - the author date of the commit being rebased as the committer >> - date. This option implies `--force-rebase`. >> + NOTE: The history walking machinery assumes that commits have >> + strictly increasing commit timestamps, with some tolerance for >> + clock skew (see linkgit:git-rev-list[1]). You should only use >> + this option to lie about the committer date when applying >> + commits on top of a base which commit is older (in terms of the > > The comments above apply here as well. In addition s/applying > commits/rebasing commits/ for this command I think. > >> + commit date) than the oldest commit you are applying (in >> + terms of the author date). > > We should also warn against using this option when rearranging commits > with "git rebase -i" as well.
True.
> Thanks for working on this, it is a very good idea to add a warning to > the documentation for this option. I'm going to be off the list for the > next 10 days or so, I'll look at any re-roll when I return.