git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* gc considered dangerous
@ 2009-02-08  2:47 Robin Rosenberg
  2009-02-08 14:34 ` Robin Rosenberg
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Robin Rosenberg @ 2009-02-08  2:47 UTC (permalink / raw)
  To: Git ML, Shawn O. Pearce


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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-02-09  7:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-08  2:47 gc considered dangerous Robin Rosenberg
2009-02-08 14:34 ` Robin Rosenberg
2009-02-08 14:56 ` Johannes Schindelin
2009-02-08 16:04   ` Robin Rosenberg
2009-02-08 17:18     ` Johannes Schindelin
2009-02-08 18:24     ` Steffen Prohaska
2009-02-08 19:37       ` Robin Rosenberg
2009-02-08 20:00   ` Junio C Hamano
2009-02-08 20:08     ` Robin Rosenberg
2009-02-08 20:10     ` Robin Rosenberg
2009-02-09  6:59     ` Mike Hommey
2009-02-09  7:43       ` Junio C Hamano
2009-02-08 20:09 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).