Thread (8 messages) 8 messages, 2 authors, 2016-06-15

Re: [RFC] git-pack-refs --prune

flat view

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:41

Possibly related (same subject, not in this thread)

Linus Torvalds [off-list ref] writes:
On Mon, 18 Sep 2006, Junio C Hamano wrote:
quoted
I am not sure I got the locking right, hence this RFC.
It looks correct (the important part to check is that the SHA1 of the ref 
you remove still matches the SHA1 of the object you packed).

That said, we should fix it up a bit, notably

 - we should _not_ prune refs that are indirect.

 - we should probably avoid even trying to prune stuff that was already 
   packed.

The way to fix both these problems at once would be to add a flag to the 
"for_each_ref()", which says whether it followed a link, or whether it was 
already packed, so that we wouldn't pack symlinks at all, and we wouldn't 
add already-packed refs to the "keeprefs" list.

But that requires a sligh semantic extension to "do_for_each_ref()" (and 
"struct ref_list" needs a flag to say whether it was looked up through a 
symlink).
Ok, so I did these and the result is a 4-patch series.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help