fetch-pack: report missing refs even if no existing refs were received
This fixes a test in t5500. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty committed
Sep 9, 2012 at 08:19 UTC
778e7543d20531bec93d5c9965f32541e78b8e34
2 files changed
+2
-2
builtin/fetch-pack.c
+1
-1
@@ -1021,7 +1021,7 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
1021
return 1;
1022
1023
ret = !ref;
1024
- if (ref && sought.nr) {
1024
+ if (sought.nr) {
1025
/* If the heads to pull were given, we should have
1026
* consumed all of them by matching the remote.
1027
* Otherwise, 'git fetch remote no-such-ref' would
t/t5500-fetch-pack.sh
+1
-1
@@ -403,7 +403,7 @@ test_expect_success 'set up tests of missing reference' '
403
EOF
404
'
405
406
-test_expect_failure 'test lonely missing ref' '
406
+test_expect_success 'test lonely missing ref' '
407
(
408
cd client &&
409
test_must_fail git fetch-pack --no-progress .. refs/heads/xyzzy