+cc: dawalker, who reported the bug
Stefan Beller wrote:
We have a user that reports:
The issue is for users who have a mirrored repository, "git pack-refs"
now overwrites the .git/packed-refs symlink instead of following it and
replacing the file it points to.
I suspect this series to be at fault, as the bug report came in a day after
we deployed next containing these changes.
Do symlinks and packed-refs ring a bell for this series?
contrib/workdir/git-new-workdir installs packed-refs as a symlink.
The reported scenario was with another tool that does something
similar for similar reasons.
Dave Walker wrote:
In the meantime, since this is linked to "git gc", it can crop up
nearly at any time you modify things from a mirror. I'd recommend
extreme care until this is sorted out, and it's probably safest to
avoid using the mirror for branch-modifying operations.
[...]
The change at fault is this one:
https://github.com/gitster/git/commit/42dfa7ecef22191b004862fb56074b408c94fc97
That's "commit_packed_refs(): use a staging file separate from the
lockfile", 2017-06-23, which would indeed appear to explain the
symptoms.
I'll try to make a reproduction recipe.
Thanks,
Jonathan