You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 out git gc command. Since git gc will move loose refs to packed-refs, I want to ensure that the in-memory packed cache is invalidated. mtime isn't reliable if git gc is super fast.
…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.
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.
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: