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

gc considered dangerous

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:46:07

I've seen this. Running git gc on Windows, while having Elipse open can kill your
object database. 

Eclipse keeps the pack files open most of the time. Then you 
launch git gui which recommends the user to do a git gc. I never
do (it *always* wants to do this), so I haven't encountered the 
issue, but if gc doesn't find a new optimal pack it tries to rewrite a 
new pack with the same id. So it rm's the idx file (fine) and the the
pack file (not ok) and gives up, which means it has a .pack file with 
no index, so it cannot use it. Trying git gc again after eclipse exits 
will execute the final stab on your objects. 

The underlying bug is ofcource that Windows locks files when
they are open. A *nix* user does not suffer from this problem.

I'll investigate more at some other time. This is a preliminary
analysis.

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