aboutsummaryrefslogtreecommitdiffstats
path: root/t/t5604-clone-reference.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-12-15 17:54:26 -0800
committerJunio C Hamano <gitster@pobox.com>2024-12-15 17:54:26 -0800
commitab738b2f1f35fbc3658ac107e1ad55b21c1e0fbc (patch)
tree8eb63219f3a49d742357586e6b924254a5adb834 /t/t5604-clone-reference.sh
parent73b7e03e9e4fdd3e09c08ff9c2d215bcabc19f34 (diff)
parentbbd445d5efd415d43ac6102a3e9541b9ac4f0329 (diff)
downloadgit-ab738b2f1f35fbc3658ac107e1ad55b21c1e0fbc.tar.gz
Merge branch 'jc/forbid-head-as-tagname'
"git tag" has been taught to refuse to create refs/tags/HEAD as such a tag will be confusing in the context of UI provided by the Git Porcelain commands. * jc/forbid-head-as-tagname: tag: "git tag" refuses to use HEAD as a tagname t5604: do not expect that HEAD can be a valid tagname refs: drop strbuf_ prefix from helpers refs: move ref name helpers around
Diffstat (limited to 't/t5604-clone-reference.sh')
-rwxr-xr-xt/t5604-clone-reference.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t5604-clone-reference.sh b/t/t5604-clone-reference.sh
index fa5ca4f522..470bfb610c 100755
--- a/t/t5604-clone-reference.sh
+++ b/t/t5604-clone-reference.sh
@@ -130,7 +130,7 @@ test_expect_success 'cloning with multiple references drops duplicates' '
test_expect_success 'clone with reference from a tagged repository' '
(
- cd A && git tag -a -m tagged HEAD
+ cd A && git tag -a -m tagged foo
) &&
git clone --reference=A A I
'
@@ -155,10 +155,10 @@ test_expect_success 'fetch with incomplete alternates' '
git remote add J "file://$base_dir/J" &&
GIT_TRACE_PACKET=$U.K git fetch J
) &&
- main_object=$(cd A && git for-each-ref --format="%(objectname)" refs/heads/main) &&
+ main_object=$(git -C A rev-parse --verify refs/heads/main) &&
test -s "$U.K" &&
! grep " want $main_object" "$U.K" &&
- tag_object=$(cd A && git for-each-ref --format="%(objectname)" refs/tags/HEAD) &&
+ tag_object=$(git -C A rev-parse --verify refs/tags/foo) &&
! grep " want $tag_object" "$U.K"
'