Skip to content

Commit 778e754

Browse files
mhaggergitster
authored andcommitted
fetch-pack: report missing refs even if no existing refs were received
This fixes a test in t5500. Signed-off-by: Michael Haggerty <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7418f1a commit 778e754

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

builtin/fetch-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
10211021
return 1;
10221022

10231023
ret = !ref;
1024-
if (ref && sought.nr) {
1024+
if (sought.nr) {
10251025
/* If the heads to pull were given, we should have
10261026
* consumed all of them by matching the remote.
10271027
* Otherwise, 'git fetch remote no-such-ref' would

t/t5500-fetch-pack.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ test_expect_success 'set up tests of missing reference' '
403403
EOF
404404
'
405405

406-
test_expect_failure 'test lonely missing ref' '
406+
test_expect_success 'test lonely missing ref' '
407407
(
408408
cd client &&
409409
test_must_fail git fetch-pack --no-progress .. refs/heads/xyzzy

0 commit comments

Comments
 (0)