diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-03-08 16:04:47 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-03-08 16:04:47 -0800 |
commit | 6c46f864e5db7c88fdee1d67dcc20a4451a12ca2 (patch) | |
tree | 7e78dd9fe75257c8ceae42211477a711f09f1cd2 /fetch-pack.c | |
parent | be7935ed8bff19f481b033d0d242c5d5f239ed50 (diff) | |
parent | 2aec3bc4b64ae4980dda86ed77f372a1f66acc7f (diff) | |
download | git-6c46f864e5db7c88fdee1d67dcc20a4451a12ca2.tar.gz |
Merge branch 'jt/transfer-fsck-across-packs-fix'
The code to fsck objects received across multiple packs during a
single git fetch session has been broken when the packfile URI
feature was in use. A workaround has been added by disabling the
codepath to avoid keeping a packfile that is too small.
* jt/transfer-fsck-across-packs-fix:
fetch-pack: do not mix --pack_header and packfile uri
Diffstat (limited to 'fetch-pack.c')
-rw-r--r-- | fetch-pack.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fetch-pack.c b/fetch-pack.c index 0cb59acc48..6a61a46428 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -846,7 +846,7 @@ static int get_pack(struct fetch_pack_args *args, else demux.out = xd[0]; - if (!args->keep_pack && unpack_limit) { + if (!args->keep_pack && unpack_limit && !index_pack_args) { if (read_pack_header(demux.out, &header)) die(_("protocol error: bad pack header")); @@ -879,7 +879,7 @@ static int get_pack(struct fetch_pack_args *args, strvec_push(&cmd.args, "-v"); if (args->use_thin_pack) strvec_push(&cmd.args, "--fix-thin"); - if (do_keep && (args->lock_pack || unpack_limit)) { + if ((do_keep || index_pack_args) && (args->lock_pack || unpack_limit)) { char hostname[HOST_NAME_MAX + 1]; if (xgethostname(hostname, sizeof(hostname))) xsnprintf(hostname, sizeof(hostname), "localhost"); |