Skip to content

some way to refresh in-memory packed refs cache without relying on mtime #1348

Closed
@yuja

Description

@yuja

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions