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

[PATCH v2 2/2] t/t3308-notes-merge.sh: succeed with relaxed notes refs

From
Kyle J. McKay <mackyle@gmail.com>
Date
Jan 6, 2015, 08:03 UTC
Message-ID
<e514c72c481c66f9808f1dd09117a16@74d39fa044aa309eaea14b9f57fe79c>
In-Reply-To
<d4509363c8f670483dacdd2a5070f5a@74d39fa044aa309eaea14b9f57fe79c>

With the recent change to allow notes refs to be located in the refs hierarchy in locations other than refs/notes/ the 'git notes merge refs/heads/master' test started succeeding.

Previously refs/heads/master would have been expanded to a non-existing, ref refs/notes/refs/heads/master, and the merge would have failed (as expected).

Now, however, since refs/heads/master exists and the new, more relaxed notes refs rules leave it unchanged, the merge succeeds. This has a follow-on effect which makes the next two tests fail as well.

The refs/heads/master ref could just be replaced with another ref name that does not exist such as refs/heads/xmaster, but there are already several tests using non-existant refs so instead just remove the refs/heads/master line.

Suggested-by: Johan Herland <johan@herland.net>
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
---
 t/t3308-notes-merge.sh | 1 -
 1 file changed, 1 deletion(-)
diff --git a/t/t3308-notes-merge.sh b/t/t3308-notes-merge.sh
index 24d82b49..f0feb64b 100755
--- a/t/t3308-notes-merge.sh
+++ b/t/t3308-notes-merge.sh
@@ -90,7 +90,6 @@ test_expect_success 'fail to merge various non-note-trees' '
 	test_must_fail git notes merge refs/notes/ &&
 	test_must_fail git notes merge refs/notes/dir &&
 	test_must_fail git notes merge refs/notes/dir/ &&
-	test_must_fail git notes merge refs/heads/master &&
 	test_must_fail git notes merge x: &&
 	test_must_fail git notes merge x:foo &&
 	test_must_fail git notes merge foo^{bar
-- 
2.1.4
Previous: Kyle J. McKayNext: Junio C Hamano
Message 3 of 16 in “Accept any notes ref”
  1. 0/2 Accept any notes refKyle J. McKay, Jan 6, 2015
  2. 1/2 notes: accept any refKyle J. McKay, Jan 6, 2015
  3. 2/2 t/t3308-notes-merge.sh: succeed with relaxed notes refsKyle J. McKay, Jan 6, 2015
  4. Junio C HamanoJan 6, 2015
  5. Kyle J. McKayJan 6, 2015
  6. Junio C HamanoJan 6, 2015
  7. Kyle J. McKayJan 6, 2015
  8. Junio C HamanoJan 6, 2015
  9. Kyle J. McKayJan 7, 2015
  10. Johan HerlandJan 7, 2015
  11. Kyle J. McKayJan 7, 2015
  12. Junio C HamanoJan 7, 2015
  13. Johan HerlandJan 7, 2015
  14. Jeff KingJan 7, 2015
  15. Junio C HamanoJan 7, 2015
  16. Jeff KingJan 8, 2015

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.