Describe the bug
fetchGit will utilize the git cache and avoid refetching when possible.
It relies on the presence of either the commit when rev is provided or checks if the ref refs/heads/<ref_name> if ref is provided.
Unfortunately, git can occasionally "pack references" which moves the references from individual files to a single unifies file.
When this occurs, nix can no longer check for the presence of the ref to check for the mtime and will refetch unecessarily.
Steps To Reproduce
Please see #13456 which adds a test case.
Expected behavior
fetchGit should still cache even if it's a packed-ref
Add 👍 to issues you find important.
Describe the bug
fetchGit will utilize the git cache and avoid refetching when possible.
It relies on the presence of either the commit when
revis provided or checks if the refrefs/heads/<ref_name>ifrefis provided.Unfortunately, git can occasionally "pack references" which moves the references from individual files to a single unifies file.
When this occurs,
nixcan no longer check for the presence of therefto check for the mtime and will refetch unecessarily.Steps To Reproduce
Please see #13456 which adds a test case.
Expected behavior
fetchGit should still cache even if it's a packed-ref
Add 👍 to issues you find important.