Merge branch 'rs/deflate-init-cleanup' into maint
[gitweb.git] / t / t5706-clone-branch.sh
index 56be67e07e3c20f029a0bdeb2179e219ebc0bda1..6e7a7be052276613bf5f83551d93b4d90536ea4e 100755 (executable)
@@ -20,7 +20,9 @@ test_expect_success 'setup' '
         echo one >file && git add file && git commit -m one &&
         git checkout -b two &&
         echo two >file && git add file && git commit -m two &&
-        git checkout master)
+        git checkout master) &&
+       mkdir empty &&
+       (cd empty && git init)
 '
 
 test_expect_success 'vanilla clone chooses HEAD' '
@@ -61,4 +63,8 @@ test_expect_success 'clone -b with bogus branch' '
        test_must_fail git clone -b bogus parent clone-bogus
 '
 
+test_expect_success 'clone -b not allowed with empty repos' '
+       test_must_fail git clone -b branch empty clone-branch-empty
+'
+
 test_done