diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-09-03 21:37:01 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-09-03 21:37:01 +0200 |
commit | bdccf5e086e5e45e5feccc22f9da0633c2492da1 (patch) | |
tree | bc91bd2d76286801ab6064cfc0c954ae25e4ece7 /fetch-pack.c | |
parent | Merge branch 'ss/t7401-modernize' (diff) | |
parent | fetch-pack: make packfile URIs work with transfer.fsckobjects (diff) | |
download | git-bdccf5e086e5e45e5feccc22f9da0633c2492da1.tar.xz git-bdccf5e086e5e45e5feccc22f9da0633c2492da1.zip |
Merge branch 'jt/fetch-pack-loosen-validation-with-packfile-uri'
Bugfix for "git fetch" when the packfile URI capability is in use.
* jt/fetch-pack-loosen-validation-with-packfile-uri:
fetch-pack: make packfile URIs work with transfer.fsckobjects
fetch-pack: document only_packfile in get_pack()
(various): document from_promisor parameter
Diffstat (limited to 'fetch-pack.c')
-rw-r--r-- | fetch-pack.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fetch-pack.c b/fetch-pack.c index d467edc24e..5eb6ed6165 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -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, @@ -895,7 +899,7 @@ static int get_pack(struct fetch_pack_args *args, : transfer_fsck_objects >= 0 ? transfer_fsck_objects : 0) { - if (args->from_promisor) + if (args->from_promisor || !only_packfile) /* * We cannot use --strict in index-pack because it * checks both broken objects and links, but we only |