fetch-pack: report missing refs even if no existing refs were received
[gitweb.git] / t / t5500-fetch-pack.sh
index 6fa1ceffee99c786beb2d9e6a3d8ec268ccc2337..894d945bdd6f0e6067c57f7c4315f759b34b0ef3 100755 (executable)
@@ -391,7 +391,7 @@ test_expect_success 'fetch mixed refs from cmdline and stdin' '
 test_expect_success 'test duplicate refs from stdin' '
        (
        cd client &&
-       test_must_fail git fetch-pack --stdin --no-progress .. <../input.dup
+       git fetch-pack --stdin --no-progress .. <../input.dup
        ) >output &&
        cut -d " " -f 2 <output | sort >actual &&
        test_cmp expect actual
@@ -403,7 +403,7 @@ test_expect_success 'set up tests of missing reference' '
        EOF
 '
 
-test_expect_failure 'test lonely missing ref' '
+test_expect_success 'test lonely missing ref' '
        (
                cd client &&
                test_must_fail git fetch-pack --no-progress .. refs/heads/xyzzy
@@ -427,4 +427,19 @@ test_expect_success 'test missing ref before existing' '
        test_cmp expect-error error-me
 '
 
+test_expect_failure 'test --all, --depth, and explicit head' '
+       (
+               cd client &&
+               git fetch-pack --no-progress --all --depth=1 .. refs/heads/A
+       ) >out-adh 2>error-adh
+'
+
+test_expect_failure 'test --all, --depth, and explicit tag' '
+       git tag OLDTAG refs/heads/B~5 &&
+       (
+               cd client &&
+               git fetch-pack --no-progress --all --depth=1 .. refs/tags/OLDTAG
+       ) >out-adt 2>error-adt
+'
+
 test_done