mirror of
https://github.com/martinvonz/jj.git
synced 2024-10-26 00:19:59 +00:00
git_backend: forcibly invalidate in-memory packed-refs cache on gc()
gix 0.63 is now available. #3537
This commit is contained in:
parent
02eb164dae
commit
68160a4e77
1 changed files with 5 additions and 7 deletions
|
@ -1222,13 +1222,11 @@ impl Backend for GitBackend {
|
||||||
// preserved by the keep_newer timestamp though)
|
// preserved by the keep_newer timestamp though)
|
||||||
// TODO: remove unreachable extras table segments
|
// TODO: remove unreachable extras table segments
|
||||||
// TODO: pass in keep_newer to "git gc" command
|
// TODO: pass in keep_newer to "git gc" command
|
||||||
run_git_gc(self.git_repo_path()).map_err(|err| BackendError::Other(err.into()))
|
run_git_gc(self.git_repo_path()).map_err(|err| BackendError::Other(err.into()))?;
|
||||||
// TODO: Since "git gc" will move loose refs into packed refs, in-memory
|
// Since "git gc" will move loose refs into packed refs, in-memory
|
||||||
// packed-refs cache should be invalidated here. If mtime accuracy is
|
// packed-refs cache should be invalidated without relying on mtime.
|
||||||
// high or "git gc" is slow enough, gix::RefStore can notice the change,
|
git_repo.refs.force_refresh_packed_buffer().ok();
|
||||||
// but it's not always the case. Upgrade gix to 0.63.0 and call
|
Ok(())
|
||||||
// force_refresh_packed_buffer().
|
|
||||||
// https://github.com/Byron/gitoxide/issues/1348
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue