X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-fetch-pack.c;h=1ea704063928d77fe1048b1abde35e42fcfb20e4;hb=88bbda08d7b9503862a8fb8846d78c67825e5e3d;hp=f4dbcf069ee8e5226d52c9c2194a8ed20ed65a34;hpb=5e707b28d9ea0bebfef5aff977e3ccebd53aa045;p=git.git diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c index f4dbcf069..1ea704063 100644 --- a/builtin-fetch-pack.c +++ b/builtin-fetch-pack.c @@ -309,7 +309,8 @@ done: } flushes--; } - return retval; + /* it is no error to fetch into a completely empty repo */ + return count ? retval : 0; } static struct commit_list *complete; @@ -519,7 +520,8 @@ static int get_pack(int xd[2], char **pack_lockfile) 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;