Skip to content

Commit

Permalink
Test :/string form for checkout
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Daniel Barkalow authored and Junio C Hamano committed Feb 5, 2008
1 parent 7a53753 commit b1e9efa
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions t/t7201-co.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit b1e9efa

Please sign in to comment.