Re: [PATCH] receive-pack: avoid sending duplicate "have" lines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lukas Fleischer <lfleischer@xxxxxxx> writes:

> @@ -254,9 +255,9 @@ static void write_head_info(void)
>  	struct sha1_array sa = SHA1_ARRAY_INIT;
>  
>  	for_each_alternate_ref(collect_one_alternate_ref, &sa);
> +	for_each_ref(show_ref_cb, &sa);
>  	sha1_array_for_each_unique(&sa, show_one_alternate_sha1, NULL);

Heh, I didn't realize that we already have half a support for this
deduping.  Good find.

We used to show ".have" from alternates first and then our own, but
now we show the refs that matter and then ".have"s from alternates
and ".have"s for our repository outside the current namespace.  That
shouldn't cause problems and the result would probably make more
sense from aesthetics point of view ;-)

I suspect that many of these that turn into ".have"s point the same
object as those sit at the tip of our refs (e.g. tags in alternates
we borrow from, which are the folks of the same project that copy
the same tags from the same upstream).  I wonder if it easy to filter
them out?  After all, if we say object X sits at refs/tags/v1.0
there is no point showing ".have" for that same object X.

>  	sha1_array_clear(&sa);
> -	for_each_ref(show_ref_cb, NULL);
>  	if (!sent_capabilities)
>  		show_ref("capabilities^{}", null_sha1);
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]