Re: Fixing commit dates before pushing
Arsen Arsenović via Gdb <[email protected]> Tue, 12 May 2026 16:58:22 +0200
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
--=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii <[email protected]> writes: > My vote is to drop the requirement. With all the possible cases which > Git supports of getting a commit into the upstream repository, I don't > think we can guarantee monotonous dates anyway. On top of that, Git already provides monotonous dates (assuming no deliberate effort to make them non-monotonous) on commits in the 'CommitDate' field. (Parts of) Git already assume(s) such a monotonous timestamps: --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. Warning The history walking machinery assumes that commits have non-decreasing commit timestamps. You should consider if you really need to use this option. Then you should only use this option to override the committer date when rebasing commits on top of a base which commit is older (in terms of the commit date) than the oldest commit you are applying (in terms of the author date). -- git-rebase(1) See also 'git log --format=3Dfuller'. =2D-=20 Arsen Arsenovi=C4=87 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQECBAEWCgCqFiEE/uKz0RP8AKMWLWBhUsKUMB6ixJMFAmoDQA4bFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMiwyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25z Lm9wZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRGRUUyQjNEMTEzRkMwMEEzMTYyRDYw NjE1MkMyOTQzMDFFQTJDNDkzEBxhcnNlbkBhYXJzZW4ubWUACgkQUsKUMB6ixJMz AgD9EwPsBgU6pz1H+u2kXtGW2BPMur75+C+nxjr1nU1+e30BANZCYC4kWvnRovde jXmLVR1xHKTUrGYDy3Rz/NDPx6sP =dgfe -----END PGP SIGNATURE----- --=-=-=--