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

fixes reflog timestamps #3901

Merged
merged 1 commit into from
May 30, 2024
Merged

fixes reflog timestamps #3901

merged 1 commit into from
May 30, 2024

Conversation

krlvi
Copy link
Member

@krlvi krlvi commented May 30, 2024

Time stapms are super imporatant for this (thanks @schacon) - without a correct time stamp, the trees will be GC'd

Time stapms are super imporatant for this (thanks @schacon) - without a correct time stamp, the trees will be GC'd
@krlvi krlvi enabled auto-merge May 30, 2024 10:02
@krlvi krlvi merged commit 93d019a into master May 30, 2024
25 checks passed
@krlvi krlvi deleted the update-reflog-time branch May 30, 2024 10:14
@Byron
Copy link
Collaborator

Byron commented May 30, 2024

That'a a great catch and sorry for not catching this myself!

Over in my latest PR I have added a test for this and could verify that it indeed fails before this fix, but works after.

@@ -86,7 +86,7 @@ fn standard_signature() -> gix::actor::SignatureRef<'static> {
gix::actor::SignatureRef {
name: GITBUTLER_INTEGRATION_COMMIT_AUTHOR_NAME.into(),
email: GITBUTLER_INTEGRATION_COMMIT_AUTHOR_EMAIL.into(),
time: Default::default(),
time: gix::date::Time::now_local_or_utc(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's good that we don't care, but as a word of warning, unless the application is single-threaded or sets time::set_soundness(Unsound), the timezone offset won't be available.

This is as time still relies on libc for this, and it isn't threadsafe. This will be an issue until this was implemented.

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

Successfully merging this pull request may close these issues.

2 participants