Skip to content

Commit

Permalink
fetch-pack: report missing refs even if no existing refs were received
Browse files Browse the repository at this point in the history
This fixes a test in t5500.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Michael Haggerty authored and Junio C Hamano committed Sep 12, 2012
1 parent 7418f1a commit 778e754
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion builtin/fetch-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion t/t5500-fetch-pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 778e754

Please sign in to comment.