Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Update author timestamp when initally committing change #3008

Closed
scott2000 opened this issue Feb 10, 2024 · 2 comments
Closed

FR: Update author timestamp when initally committing change #3008

scott2000 opened this issue Feb 10, 2024 · 2 comments

Comments

@scott2000
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
When I look at the author timestamp of a commit, I usually expect to see the timestamp when I first committed code for that change. However, the working copy commit seems to always set the author timestamp when it is first created (even if no changes have been made yet). For instance, I might do jj new after finishing working on a feature on Feb 9th, then not work on that project for a week, then start working on a new feature on Feb 16th, but when I commit my changes, the author timestamp will show Feb 9th.

Describe the solution you'd like
To me it seems like the author timestamp should not be "finalized" until a description is set on the commit. Like whenever a commit goes from having an empty description to having a non-empty description, the author timestamp should be reset. Or perhaps instead it could happen when the commit itself goes from being empty to being non-empty.

Describe alternatives you've considered
I could do jj describe --reset-author --no-edit to reset the author when I start working on a new feature on an existing working copy commit, or jj abandon to create a new commit entirely, but I might forget to do that. I could also just ignore the author timestamp. jj commit doesn't appear to support a --reset-author option, so I don't think I could set an alias for that.

@ilyagr
Copy link
Collaborator

ilyagr commented Feb 10, 2024

This was discussed previously (and without a conclusion) in #2000.

Setting the date when a commit becomes non-empty OR gains a description is "option 1" in there. I'm not sure just depending just on the description is as good, but I'm not entirely sure. "Option 2" there is to update the author date on every edit except for rebases.

I think I'm leaning towards "option 1" at the moment, but I haven't thought about this for a while.

@ilyagr
Copy link
Collaborator

ilyagr commented Feb 10, 2024

In fact, I'll close this as a duplicate of #2000.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants