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

From: Junio C Hamano <junkio@cox.net>
Date: 2006-09-21 17:02:15
Linus Torvalds <torvalds@osdl.org> writes:

> On Mon, 18 Sep 2006, Junio C Hamano wrote:
>> 
>> 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.


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Thu Sep 21 17:02:20 2006

This archive was generated by hypermail 2.1.8 : 2006-09-21 17:03:10 EST