From: Daniel Barkalow Date: Sat, 2 Feb 2008 09:37:01 +0000 (-0500) Subject: Test :/string form for checkout X-Git-Tag: v1.5.5-rc0~257 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b1e9efa7c0153fd4e4ffc86c128262e4176e87af;p=git.git Test :/string form for checkout Signed-off-by: Daniel Barkalow Signed-off-by: Junio C Hamano --- diff --git a/t/t7201-co.sh b/t/t7201-co.sh index 73d8a00e2..dbf1ace29 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 &&