summaryrefslogtreecommitdiff
path: root/t/t6300-for-each-ref.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-02-27 09:29:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-02-27 19:33:44 (GMT)
commitf0252ca23c5c33765d189be4999254bf722a8b99 (patch)
tree339c394c6ca5926f85d46f5366efbe240071f304 /t/t6300-for-each-ref.sh
parent3b9e3c2cede15057af3ff8076c45ad5f33829436 (diff)
downloadgit-f0252ca23c5c33765d189be4999254bf722a8b99.zip
git-f0252ca23c5c33765d189be4999254bf722a8b99.tar.gz
git-f0252ca23c5c33765d189be4999254bf722a8b99.tar.bz2
t6300: avoid creating refs/heads/HEAD
In one test, we use "git checkout --orphan HEAD" to create an unborn branch. Confusingly, the resulting branch is named "refs/heads/HEAD". The original probably meant something like: git checkout --orphan orphaned-branch HEAD Let's just use "orphaned-branch" here to make this less confusing. Putting HEAD in the second argument is already implied. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6300-for-each-ref.sh')
-rwxr-xr-xt/t6300-for-each-ref.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
index 039509a..37e021f 100755
--- a/t/t6300-for-each-ref.sh
+++ b/t/t6300-for-each-ref.sh
@@ -558,7 +558,7 @@ test_expect_success 'do not dereference NULL upon %(HEAD) on unborn branch' '
test_when_finished "git checkout master" &&
git for-each-ref --format="%(HEAD) %(refname:short)" refs/heads/ >actual &&
sed -e "s/^\* / /" actual >expect &&
- git checkout --orphan HEAD &&
+ git checkout --orphan orphaned-branch &&
git for-each-ref --format="%(HEAD) %(refname:short)" refs/heads/ >actual &&
test_cmp expect actual
'