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

[PATCH 1/6] t5519: push two branches to alternate repo

From
mhagger@alum.mit.edu <mhagger@alum.mit.edu>
Date
Dec 13, 2011, 20:06 UTC
Message-ID
<1323806811-5798-2-git-send-email-mhagger@alum.mit.edu>
In-Reply-To
<1323806811-5798-1-git-send-email-mhagger@alum.mit.edu>
From: Michael Haggerty <mhagger@alum.mit.edu>

Since each branch in the alternate repo results in an "extra_ref" named ".have", pushing two of them results in two extra_refs with the same name. This change to the test therefore makes sure that we can handle extra_refs names that are not unique.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
---

I'm not sure how well this change fits into the other things that the test wants to do, but it triggers the failure mode in ref-api-D v2 that was predicted by Junio.

 t/t5519-push-alternates.sh |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/t/t5519-push-alternates.sh b/t/t5519-push-alternates.sh
index c00c9b0..315f65d 100755
--- a/t/t5519-push-alternates.sh
+++ b/t/t5519-push-alternates.sh
@@ -17,7 +17,15 @@ test_expect_success setup '
 		>file &&
 		git add . &&
 		git commit -m initial &&
-		git push ../alice-pub master
+		git checkout -b foo &&
+		>file1 &&
+		git add . &&
+		git commit -m file1 &&
+		git checkout master &&
+		>file2 &&
+		git add . &&
+		git commit -m file2 &&
+		git push ../alice-pub master foo
 	) &&
 
 	# Project Bob is a fork of project Alice
-- 
1.7.8
Previous: mhagger@alum.mit.eduNext: mhagger@alum.mit.edu
Message 2 of 7 in “Handle extra_refs separately from ref_caches”
  1. 0/6 Handle extra_refs separately from ref_cachesmhagger@alum.mit.edu, Dec 13, 2011
  2. 1/6 t5519: push two branches to alternate repomhagger@alum.mit.edu, Dec 13, 2011
  3. 2/6 add_extra_ref(): remove flag argumentmhagger@alum.mit.edu, Dec 13, 2011
  4. 3/6 Extract a function do_for_each_extra_ref()mhagger@alum.mit.edu, Dec 13, 2011
  5. 4/6 Store extra_refs in a separate data structuremhagger@alum.mit.edu, Dec 13, 2011
  6. 5/6 Omit extra_refs except when iterating using for_each_ref()mhagger@alum.mit.edu, Dec 13, 2011
  7. 6/6 do_for_each_extra_ref(): simplify signaturemhagger@alum.mit.edu, Dec 13, 2011

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.