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

Re: gc considered dangerous

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:46:07

Hi,

On Sun, 8 Feb 2009, Robin Rosenberg wrote:
I've seen this. Running git gc on Windows, while having Elipse open can 
kill your object database.
You had me really scared with the mail subject!
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,
I disagree with your notion that it is fine to kill the existing idx file 
until the new one has been written successfully.

My preliminary guess is that this code in pack-write.c needs to use the 
lock file paradigm:

        if (!index_name) {
		[...]
        } else {
                unlink(index_name);
                fd = open(index_name, O_CREAT|O_EXCL|O_WRONLY, 0600);
        }

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