Skip to content

Commit b1e9efa

Browse files
iabervongitster
authored andcommitted
Test :/string form for checkout
Signed-off-by: Daniel Barkalow <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7a53753 commit b1e9efa

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

t/t7201-co.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,22 @@ test_expect_success 'checkout to detach HEAD with branchname^' '
214214
fi
215215
'
216216

217+
test_expect_success 'checkout to detach HEAD with :/message' '
218+
219+
git checkout -f master && git clean -f &&
220+
git checkout ":/Initial" &&
221+
H=$(git rev-parse --verify HEAD) &&
222+
M=$(git show-ref -s --verify refs/heads/master) &&
223+
test "z$H" = "z$M" &&
224+
if git symbolic-ref HEAD >/dev/null 2>&1
225+
then
226+
echo "OOPS, HEAD is still symbolic???"
227+
false
228+
else
229+
: happy
230+
fi
231+
'
232+
217233
test_expect_success 'checkout to detach HEAD with HEAD^0' '
218234
219235
git checkout -f master && git clean -f &&

0 commit comments

Comments
 (0)