From: Junio C Hamano Date: Mon, 17 Mar 2008 07:48:40 GMT Subject: Re: tracking repository Message-ID: <7v3aqpdc4n.fsf@gitster.siamese.dyndns.org> In-Reply-To: Daniel Barkalow writes: > On Sun, 16 Mar 2008, Junio C Hamano wrote: > >> Daniel Barkalow writes: >> >> > We don't currently have any concept of an invalid refspec; >> >> We don't? or just that parse_ref_spec() does not detect one? >> >> > ... we just have >> > things that fall back to not being patterns and not being possible to >> > match (due to one or the other side being invalid as a ref name). >> >> I am afraid that is an invitation for more bugs and confusions. > > Yeah, we're definitely too lenient. t3200-branch has been using the > refspec "=" since July without anybody noticing that it's wrong. You mean these that came in 6f084a5 (branch --track: code cleanup and saner handling of local branches, 2007-07-10), right? Will you fix them while you come up with a patch to tighten the parsing? Fixing these does seem to trigger problems in later parts of the test sequence. --- t/t3200-branch.sh | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 38a90ad..48b8a45 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -155,10 +155,10 @@ test_expect_success 'test tracking setup via config' \ test_expect_success 'avoid ambiguous track' ' git config branch.autosetupmerge true && - git config remote.ambi1.url = lalala && - git config remote.ambi1.fetch = refs/heads/lalala:refs/heads/master && - git config remote.ambi2.url = lilili && - git config remote.ambi2.fetch = refs/heads/lilili:refs/heads/master && + git config remote.ambi1.url lalala && + git config remote.ambi1.fetch refs/heads/lalala:refs/heads/master && + git config remote.ambi2.url lilili && + git config remote.ambi2.fetch refs/heads/lilili:refs/heads/master && git branch all1 master && test -z "$(git config branch.all1.merge)" '