Test :/string form for checkout
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Daniel Barkalow committed
Feb 2, 2008 at 04:37 UTC
b1e9efa7c0153fd4e4ffc86c128262e4176e87af
1 file changed
+16
t/t7201-co.sh
+16
@@ -214,6 +214,22 @@ test_expect_success 'checkout to detach HEAD with branchname^' '
214
fi
215
'
216
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
+
233
test_expect_success 'checkout to detach HEAD with HEAD^0' '
234
235
git checkout -f master && git clean -f &&