Thread (4 messages) flat view 4 messages, 4 authors, 2016-06-15

Re: Missing Refs after Garbage Collection

From: Dmitry Potapov <hidden>
Date: 2016-06-15 22:55:35

Hi,

On Sat, Dec 22, 2012 at 5:41 AM, Earl Gresh [off-list ref] wrote:
Is anyone familiar with git gc deleting valid references? I'm running
git version 1.7.8. Have there been any patches in later git releases
that might address this issue ( if it is a git problem )?
I have not seen any relevant changes in git. I have looked at the code,
and what git-gc is running "git pack-refs --all --prune", which is very
careful in packing and fsyncing the new file with all packed references
before deleting anything. Only those references that were packed can be
deleted. Also, it does not matter whether a reference is valid or not,
or whether it is stored in refs/changes or in some other place, like
refs/heads. So if references were really lost as you described, I think
other people would notice that by now.

The only plausible explanation that comes to my mind now is that file
creation using O_EXCL is not atomic on your system, then the lock did
not work and one process could overwrite packed references created by
another.


Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help