git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: tracking repository

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 17, 2008, 07:48 UTC
Message-ID
<7v3aqpdc4n.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.LNX.1.00.0803162234270.19665@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
Show 16 quoted lines
> On Sun, 16 Mar 2008, Junio C Hamano wrote:
>
>> Daniel Barkalow <barkalow@iabervon.org> 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)"
 '
Previous: Daniel BarkalowNext: Daniel Barkalow
Message 15 of 16 in “tracking repository”
  1. kenneth johanssonMar 15, 2008
  2. Junio C HamanoMar 16, 2008
  3. kenneth johanssonMar 16, 2008
  4. Junio C HamanoMar 16, 2008
  5. Daniel BarkalowMar 16, 2008
  6. Junio C HamanoMar 16, 2008
  7. Daniel BarkalowMar 16, 2008
  8. Junio C HamanoMar 16, 2008
  9. Junio C HamanoMar 16, 2008
  10. Daniel BarkalowMar 16, 2008
  11. Junio C HamanoMar 17, 2008
  12. Junio C HamanoMar 17, 2008
  13. Daniel BarkalowMar 17, 2008
  14. Daniel BarkalowMar 17, 2008
  15. Junio C HamanoMar 17, 2008
  16. Daniel BarkalowMar 17, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.