aboutsummaryrefslogtreecommitdiffstats
path: root/fetch-pack.c
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2021-02-22 11:20:07 -0800
committerJunio C Hamano <gitster@pobox.com>2021-02-22 12:07:40 -0800
commit27e35ba6c6b532ad6fc88b554d437b6892b4e915 (patch)
treef193e02cb315dc7b30acd5358654a11832d98e9d /fetch-pack.c
parent726b25a91ba0e8f26f83c8d39ad16351b7bdb510 (diff)
downloadgit-27e35ba6c6b532ad6fc88b554d437b6892b4e915.tar.gz
http-fetch: allow custom index-pack args
This is the next step in teaching fetch-pack to pass its index-pack arguments when processing packfiles referenced by URIs. The "--keep" in fetch-pack.c will be replaced with a full message in a subsequent commit. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fetch-pack.c')
-rw-r--r--fetch-pack.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fetch-pack.c b/fetch-pack.c
index 876f90c759..aeac010b0b 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -1645,6 +1645,9 @@ static struct ref *do_fetch_pack_v2(struct fetch_pack_args *args,
strvec_pushf(&cmd.args, "--packfile=%.*s",
(int) the_hash_algo->hexsz,
packfile_uris.items[i].string);
+ strvec_push(&cmd.args, "--index-pack-arg=index-pack");
+ strvec_push(&cmd.args, "--index-pack-arg=--stdin");
+ strvec_push(&cmd.args, "--index-pack-arg=--keep");
strvec_push(&cmd.args, uri);
cmd.git_cmd = 1;
cmd.no_stdin = 1;