Re: People unaware of the importance of "git gc"?

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: People unaware of the importance of "git gc"?

From: David Kastrup <hidden>
Date: 2016-06-15 22:43:33

Brandon Casey [off-list ref] writes:
On Wed, 5 Sep 2007, J. Bruce Fields wrote:
quoted
Well, this may just prove I'm an idiot, but one of the reasons I rarely
run it is that I have trouble remembering exactly what it does; in
particular,

	- does it prune anything that might be needed by a repo I
	  cloned with -s?
    YES! yikes.

This is about the best argument put forth so far for not
automatically running git-gc.
Well, it could also mean that if git finds a dead symbolic link when
looking up an object, it should check the corresponding link target
directory for a pack file with the respective object...  and if it
finds such a pack file, create a link to it and use it.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

Re: People unaware of the importance of "git gc"?

From: J. Bruce Fields <hidden>
Date: 2016-06-15 22:43:33

On Wed, Sep 05, 2007 at 09:09:40PM +0200, David Kastrup wrote:
Brandon Casey [off-list ref] writes:
quoted
On Wed, 5 Sep 2007, J. Bruce Fields wrote:
quoted
Well, this may just prove I'm an idiot, but one of the reasons I rarely
run it is that I have trouble remembering exactly what it does; in
particular,

	- does it prune anything that might be needed by a repo I
	  cloned with -s?
    YES! yikes.

This is about the best argument put forth so far for not
automatically running git-gc.
Well, it could also mean that if git finds a dead symbolic link when
looking up an object, it should check the corresponding link target
directory for a pack file with the respective object...  and if it
finds such a pack file, create a link to it and use it.
One of the two of us is very confused about what "git-clone -s" does.
See the git-clone man page.  I don't think symlinks are involved.

--b.

Re: People unaware of the importance of "git gc"?

From: Mike Hommey <hidden>
Date: 2016-06-15 22:43:33

On Wed, Sep 05, 2007 at 09:09:40PM +0200, David Kastrup [off-list ref] wrote:
Brandon Casey [off-list ref] writes:
quoted
On Wed, 5 Sep 2007, J. Bruce Fields wrote:
quoted
Well, this may just prove I'm an idiot, but one of the reasons I rarely
run it is that I have trouble remembering exactly what it does; in
particular,

	- does it prune anything that might be needed by a repo I
	  cloned with -s?
    YES! yikes.

This is about the best argument put forth so far for not
automatically running git-gc.
Well, it could also mean that if git finds a dead symbolic link when
looking up an object, it should check the corresponding link target
directory for a pack file with the respective object...  and if it
finds such a pack file, create a link to it and use it.
The problem here is that the clone could be having refs on objects from
the origin that don't have refs left there. git-gc might, at some point,
prune these refs, and the clone would have dangling refs. That could
easily happen, for example, if you rebase a branch in the origin, but
still have a clone with the original branch.

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