test: checkout shouldn't say that HEAD has moved if it didn't
Signed-off-by: しらいしななこ <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nanako Shiraishi committed
May 17, 2009 at 11:43 UTC
e4b09dad9f65395fd4bb8ab165012a3a6698a75b
1 file changed
+8
t/t7201-co.sh
+8
@@ -534,4 +534,12 @@ test_expect_success 'failing checkout -b should not break working tree' '
534
535
'
536
537
+test_expect_success 'switch out of non-branch' '
538
+ git reset --hard master &&
539
+ git checkout master^0 &&
540
+ echo modified >one &&
541
+ test_must_fail git checkout renamer 2>error.log &&
542
+ ! grep "^Previous HEAD" error.log
543
+'
544
+
545
test_done