Thread (29 messages) 29 messages, 6 authors, 2025-04-29

Re: [PATCH v3 2/2] bundle-uri: add test for bundle-uri clones with tags

From: Phillip Wood <hidden>
Date: 2025-03-19 10:33:51

Hi Scott

On 18/03/2025 15:36, Scott Chacon via GitGitGadget wrote:
From: Scott Chacon <redacted>

+test_expect_success 'clone with tags bundle' '
+	git clone --bundle-uri="clone-from-tags/ALL.bundle" \
+		clone-from-tags clone-tags-path &&
+	git -C clone-tags-path for-each-ref --format="%(refname)" >refs &&
+	grep "refs/bundles/tags/" refs >actual &&
Thanks for adding this test. Calling "git for-each-ref" followed by 
"grep" follows the pattern of the existing tests but I'm not sure why 
they don't just pass the pattern to "for-each-ref" and avoid the extra 
process.

Do we want to just test for tags or are we really interested to see all 
the bundle refs created when cloning? This applies to the previous patch 
as well - we obviously need to change the expected output but I'm not 
sure changing the ref pattern is necessarily a good idea. After all the 
point of this series is to create refs under refs/bundles for all the 
refs in the bundle.

Best Wishes

Phillip
+	cat >expect <<-\EOF &&
+	refs/bundles/tags/A
+	refs/bundles/tags/B
+	refs/bundles/tags/tag-A
+	EOF
+	test_cmp expect actual
+'
+
  # To get interesting tests for bundle lists, we need to construct a
  # somewhat-interesting commit history.
  #
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help