Merge branch 'en/t3031-title-fix'
[gitweb.git] / t / t2010-checkout-ambiguous.sh
index e76e84afbba58f94c600586388f8793b6b6eae84..2e47fe01cfaf565777c9359e7c2675ef051c33e3 100755 (executable)
@@ -41,6 +41,15 @@ test_expect_success 'check ambiguity' '
        test_must_fail git checkout world all
 '
 
+test_expect_success 'check ambiguity in subdir' '
+       mkdir sub &&
+       # not ambiguous because sub/world does not exist
+       git -C sub checkout world ../all &&
+       echo hello >sub/world &&
+       # ambiguous because sub/world does exist
+       test_must_fail git -C sub checkout world ../all
+'
+
 test_expect_success 'disambiguate checking out from a tree-ish' '
        echo bye > world &&
        git checkout world -- world &&