]> git.ipfire.org Git - thirdparty/git.git/commitdiff
fetch-pack: document only_packfile in get_pack()
authorJonathan Tan <jonathantanmy@google.com>
Mon, 17 Aug 2020 19:48:19 +0000 (12:48 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 25 Aug 2020 00:31:09 +0000 (17:31 -0700)
dd4b732df7 ("upload-pack: send part of packfile response as uri",
2020-06-10) added the "only_packfile" parameter to get_pack() but did
not document it. Add documentation.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fetch-pack.c

index 7f20eca4f81ce401f951361ce59e1be6aa31cd67..289121038e79a3e145e0195413939a0e31ab316b 100644 (file)
@@ -794,6 +794,10 @@ static void write_promisor_file(const char *keep_name,
        strbuf_release(&promisor_name);
 }
 
+/*
+ * Pass 1 as "only_packfile" if the pack received is the only pack in this
+ * fetch request (that is, if there were no packfile URIs provided).
+ */
 static int get_pack(struct fetch_pack_args *args,
                    int xd[2], struct string_list *pack_lockfiles,
                    int only_packfile,