]> git.ipfire.org Git - thirdparty/git.git/commitdiff
fetch-pack: report missing refs even if no existing refs were received
authorMichael Haggerty <mhagger@alum.mit.edu>
Sun, 9 Sep 2012 06:19:47 +0000 (08:19 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Sep 2012 18:46:32 +0000 (11:46 -0700)
This fixes a test in t5500.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch-pack.c
t/t5500-fetch-pack.sh

index fb2a423b5199b807c04ab24e82c90c3c3fbe86b2..3d388b53e3b52be1757146de9e72ba3d81c51673 100644 (file)
@@ -1021,7 +1021,7 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
                return 1;
 
        ret = !ref;
-       if (ref && sought.nr) {
+       if (sought.nr) {
                /* If the heads to pull were given, we should have
                 * consumed all of them by matching the remote.
                 * Otherwise, 'git fetch remote no-such-ref' would
index acd41e8576f2f1b3850129c9e788ccffa9221e17..894d945bdd6f0e6067c57f7c4315f759b34b0ef3 100755 (executable)
@@ -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