Re: [PATCH 1/2] fetch/push: allow refs/*:refs/*

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Michael Haggerty <mhagger@xxxxxxxxxxxx> writes:
> ...
>> * The second branch of the if is *never* executed.
> 		else if (args.fetch_all &&
> 			 (!args.depth || prefixcmp(ref->name, "refs/tags/") )) {
> 			*newtail = ref;
> 			ref->next = NULL;
> 			newtail = &ref->next;
> 			continue;
> 		}
>
> I am not familiar with (nor particularly interested in) the "args.depth"
> code, so I have no comment on this part offhand.

This is "fetch --all" case.  I think the original intent was to
fetch all branches (hence exclusion of tags) so the prefixcmp() may
not be correct (!prefixcmp() with "refs/heads" would be more kosher)
these days.  I am not sure what !args.depth check wants to do here
(that is, I can see it wants to defeat "fetch --all" and instead
make it go through the usual refspec matching codepath, but I do not
know why we thought that is a good thing to do here).



--
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]