-
-
Notifications
You must be signed in to change notification settings - Fork 306
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
some way to refresh in-memory packed refs cache without relying on mtime #1348
Labels
enhancement
New feature or request
Comments
Byron
added a commit
that referenced
this issue
Apr 22, 2024
…1348) That way it's possible to explicitly refresh if the caller knows that some other operation might have invalidated the in-memory cache. The `mtime` based approach doesn't work reliably on all filesystems due to coarse granularity of time.
Thanks for bringing this up! I have implemented this in f2d8955 which will definitely be merged within a month or less. Edit: It will be merged very soon to fix the cargo-deny based CI failure as well. |
Closing, as the branch was merged and the method will be available with the next release. Please feel free to leave additional comments or reopen as you see fit. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary 💡
Does it make sense to add API to trigger
RefStore::force_refresh_packed_buffer()
or make it public?Motivation 🔦
In jj, gc is implemented as a combination of internal ref cleanup through
gix
API + shelling outgit gc
command. Sincegit gc
will move loose refs to packed-refs, I want to ensure that the in-memory packed cache is invalidated.mtime
isn't reliable ifgit gc
is super fast.https://github.com/martinvonz/jj/blob/77eaf67f96c6ea438e2dd1a5636f34b6a321e6be/lib/src/git_backend.rs#L1213
The text was updated successfully, but these errors were encountered: