summaryrefslogtreecommitdiff
path: root/http.h
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2021-02-22 19:20:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-02-22 20:07:40 (GMT)
commit726b25a91ba0e8f26f83c8d39ad16351b7bdb510 (patch)
treee7a717d55dae65d2fcc0f901f58a306bcd36a726 /http.h
parent66e871b6647ffea61a77a0f82c7ef3415f1ee79c (diff)
downloadgit-726b25a91ba0e8f26f83c8d39ad16351b7bdb510.zip
git-726b25a91ba0e8f26f83c8d39ad16351b7bdb510.tar.gz
git-726b25a91ba0e8f26f83c8d39ad16351b7bdb510.tar.bz2
http: allow custom index-pack args
Currently, when fetching, packfiles referenced by URIs are run through index-pack without any arguments other than --stdin and --keep, no matter what arguments are used for the packfile that is inline in the fetch response. As a preparation for ensuring that all packs (whether inline or not) use the same index-pack arguments, teach the http subsystem to allow custom index-pack arguments. http-fetch has been updated to use the new API. For now, it passes --keep alone instead of --keep with a process ID, but this is only temporary because http-fetch itself will be taught to accept index-pack parameters (instead of using a hardcoded constant) in a subsequent commit. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.h')
-rw-r--r--http.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/http.h b/http.h
index 5de792e..bf3d127 100644
--- a/http.h
+++ b/http.h
@@ -218,12 +218,12 @@ struct http_pack_request {
char *url;
/*
- * If this is true, finish_http_pack_request() will pass "--keep" to
- * index-pack, resulting in the creation of a keep file, and will not
- * suppress its stdout (that is, the "keep\t<hash>\n" line will be
- * printed to stdout).
+ * index-pack command to run. Must be terminated by NULL.
+ *
+ * If NULL, defaults to {"index-pack", "--stdin", NULL}.
*/
- unsigned generate_keep : 1;
+ const char **index_pack_args;
+ unsigned preserve_index_pack_stdout : 1;
FILE *packfile;
struct strbuf tmpfile;