Re: [PATCH 1/7] add special "matching refs" refspec

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

 




+		if (rs[i].matching &&
+		    (matching_refs == -1 || rs[i].force)) {
+			matching_refs = i;
+			continue;
+		}

It is probably better to document that you would force if you have both
"+:" and ":" for the same remote, even though I am not sure if allowing
that (instead of diagnosing it as an error) is the right thing to do.

I screwed up here.  I was sure that something like

        push = refs/heads/*:refs/heads/*
        push = +refs/heads/*:refs/heads/*

would also force, instead the first one wins. I'm ok with just removing the "|| rs[i].force" part.

Is it an error to have both ":" and "some:other" refspecs for the same
remote?  If so who makes the check?

No, it is not an error.  For example, it allows to have a

	push = refs/tags/*:refs/tags/*
	push = :

refspec, which pushes all tags but only pushes branches if there is a matching ref on the other side. I don't have a use for this, but it made sense to support the general case.

Otherwise this patch seems to be very cleanly done.  Especially I like how
the updated match_refs() looks.

Thanks.  Should I resubmit?

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

  Powered by Linux