summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorDaniel Barkalow <barkalow@iabervon.org>2008-02-02 09:37:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-05 04:10:07 (GMT)
commitb1e9efa7c0153fd4e4ffc86c128262e4176e87af (patch)
tree3f1546eabd5a6370e71dd38a6ee5c055e54fefef /t
parent7a5375395f8104a8679f9482e0c5faf60e7e9e54 (diff)
downloadgit-b1e9efa7c0153fd4e4ffc86c128262e4176e87af.zip
git-b1e9efa7c0153fd4e4ffc86c128262e4176e87af.tar.gz
git-b1e9efa7c0153fd4e4ffc86c128262e4176e87af.tar.bz2
Test :/string form for checkout
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t7201-co.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t7201-co.sh b/t/t7201-co.sh
index 73d8a00..dbf1ace 100755
--- a/t/t7201-co.sh
+++ b/t/t7201-co.sh
@@ -214,6 +214,22 @@ test_expect_success 'checkout to detach HEAD with branchname^' '
fi
'
+test_expect_success 'checkout to detach HEAD with :/message' '
+
+ git checkout -f master && git clean -f &&
+ git checkout ":/Initial" &&
+ H=$(git rev-parse --verify HEAD) &&
+ M=$(git show-ref -s --verify refs/heads/master) &&
+ test "z$H" = "z$M" &&
+ if git symbolic-ref HEAD >/dev/null 2>&1
+ then
+ echo "OOPS, HEAD is still symbolic???"
+ false
+ else
+ : happy
+ fi
+'
+
test_expect_success 'checkout to detach HEAD with HEAD^0' '
git checkout -f master && git clean -f &&