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 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.
https://github.com/martinvonz/jj/blob/77eaf67f96c6ea438e2dd1a5636f34b6a321e6be/lib/src/git_backend.rs#L1213