Merge branch 'kk/maint-commit-tree' into maint
[gitweb.git] / t / t2015-checkout-unborn.sh
index 6352b74e2e54e5e08941d8d5d90ac30b202b56c1..37bdcedcc952083ba336cb9eaca5c67424d2cbb6 100755 (executable)
@@ -46,4 +46,15 @@ test_expect_success 'checking out another branch from unborn state' '
        test_cmp expect actual
 '
 
+test_expect_success 'checking out in a newly created repo' '
+       test_create_repo empty &&
+       (
+               cd empty &&
+               git symbolic-ref HEAD >expect &&
+               test_must_fail git checkout &&
+               git symbolic-ref HEAD >actual &&
+               test_cmp expect actual
+       )
+'
+
 test_done