diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index de1e8d1365769c7c841749901f705c0b6a78eab3..1ea704063928d77fe1048b1abde35e42fcfb20e4 100644 (file)
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
}
flushes--;
}
- return retval;
+ /* it is no error to fetch into a completely empty repo */
+ return count ? retval : 0;
}
static struct commit_list *complete;
if (read_pack_header(demux.out, &header))
die("protocol error: bad pack header");
- snprintf(hdr_arg, sizeof(hdr_arg), "--pack_header=%u,%u",
+ snprintf(hdr_arg, sizeof(hdr_arg),
+ "--pack_header=%"PRIu32",%"PRIu32,
ntohl(header.hdr_version), ntohl(header.hdr_entries));
if (ntohl(header.hdr_entries) < unpack_limit)
do_keep = 0;
}
}
+ reprepare_packed_git();
return ref_cpy;
}