New issue
Advanced search Search tips

Issue 809202 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Commit date is date that CL was created

Project Member Reported by eakuefner@chromium.org, Feb 5 2018

Issue description

This specifically concerns Catapult, and doesn't appear to be true for Chromium.

I don't think this used to be the case, but now CLs are being stamped with the date that the CL was created, when they are committed, rather than date at which the CL was landed.

This is bad because we wanted to be able to assume that commit timestamps are monotonic, and it also makes git logs confusing to read. Is this behavior expected?
 
Labels: -Pri-1 Pri-3
Okay, upon investigation this might be a non-bug. GitHub hides the fact that each commit actually has two timestamps, and only shows the author timestamp, but Gitiles reports the author timestamp and the commit timestamp correctly.

It's still odd that the behavior appears to be different for Chromium and Catapult. In Chromium, Gitiles seems to show that the author and commit timestamps are synchronized, whereas in Catapult, Gitiles shows that the author timestamp is the date the CL was created.
Gerrit has a per-repository setting called "matchAuthorToCommitterDate" (https://gerrit-review.googlesource.com/Documentation/config-project-config.html#submit-section). If that setting is True, and the repo already uses a submit strategy which synthesizes a new commit at submit time (e.g. Rebase Always), then the Author and Committer dates will be made to match.

This setting was created specifically for Chromium, because chromium engineers were accustomed to the commit objects being generated by the CQ (after it downloaded and applied the diff from Rietveld), and therefore having matching author and committer timestamps anyway. Turning this setting on *is* explicitly a loss of information, and isn't the way most other git projects behave. But there's a legitimate argument that, especially in chromium-style projects, the information it loses is unimportant, and the benefit of having matching dates and having the same settings as chromium itself is reasonable.

If catapult wants this, we can set it there.
Status: WontFix (was: Untriaged)
Thanks for the very detailed explanation! To be honest, I don't particularly care about synchronizing the timestamps but also don't feel that the author timestamp is very useful. But since doing nothing would be less work, I think that's fine with me.

I noticed that Gitiles does the "right thing", i.e. shows the commit timestamp rather than the author timestamp that GitHub shows, and I expect personally to be linking more frequently to Gitiles and less frequently to GitHub, going forward.

Sign in to add a comment