How is the Git AuthorDate determined when pushing changes with jj git push? #6152
Replies: 3 comments 2 replies
-
When did you create the initial revision, so |
Beta Was this translation helpful? Give feedback.
-
The author date is set when a revision is first created, then persisted as that revision evolves. You can reset the author date of a commit to the current time with It works this way because revisions have two dates: the author date and the committer date. With git, the committer date is generally updated on any modification. But, the author date is not. So, if you rebase or amend a commit, the committer date is updated but the author date is left alone. This can be a little confusing with jj because you start work by creating a revision rather than end work by creating one. So, you might end up finalizing your work in a revision that was originally created weeks ago. |
Beta Was this translation helpful? Give feedback.
-
The |
Beta Was this translation helpful? Give feedback.
-
Hi Jujutsu team and community,
I’m trying to understand how Jujutsu determines the Git
AuthorDate
when pushing changes to a Git repository. I’ve encountered a situation where the AuthorDate for my commits is set to a date two weeks ago, even for revisions that were created today (e.g., usingjj split
). I’m hoping you can help clarify the behavior and whether this is expected or if I might be missing something.Example:
I worked on a change today and used
jj split
to create multiple revisions. When I pushed the changes to a Git repository usingjj git push
, I noticed that all commits in the pushed branch have an AuthorDate of two weeks ago (March 13, 2025). This is confusing for reviewers on GitLab, as it makes it appear as though I started working on this branch two weeks ago, which isn’t accurate.Here’s an example of the relevant information:
jj evolog
output for the revision in question (created today):From this, you can see that the revision surysnyx was created today.
Git commit details after pushing to the Git repository:
Notice that the AuthorDate is set to March 13, 2025—two weeks ago. This is true not only for this commit but for all commits in the pushed branch.
I would expect the AuthorDate in the Git commits is the first revision in the evolog for this change (e.g., 2025-03-27 13:31:32 in this example).
Why is the AuthorDate set to a date two weeks ago, even for revisions created today (using
jj split
)?I haven’t filed this as an issue because I suspect there might be a good reason for this behavior, and I’d like to understand it better before assuming it’s a bug. Any insights or explanations would be greatly appreciated!
Thank you for your time and for building such an interesting tool!
Beta Was this translation helpful? Give feedback.
All reactions