diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2020-08-17 12:48:20 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-24 17:34:24 -0700 |
commit | 0bd96bea2f9718d2ce03e0bc4bbf0b5894f9b28e (patch) | |
tree | e9153e55e920593d01149dd1120df8155f840684 /fetch-pack.c | |
parent | ece9aea2c139764a82f162697586bc738873fb2f (diff) | |
download | git-0bd96bea2f9718d2ce03e0bc4bbf0b5894f9b28e.tar.gz |
fetch-pack: make packfile URIs work with transfer.fsckobjects
When fetching with packfile URIs and transfer.fsckobjects=1, use the
--fsck-objects instead of the --strict flag when invoking index-pack so
that links are not checked, only objects. This is because incomplete
links are expected. (A subsequent connectivity check will be done when
all the packs have been downloaded regardless of whether
transfer.fsckobjects is set.)
This is similar to 98a2ea46c2 ("fetch-pack: do not check links for
partial fetch", 2018-03-15), but for packfile URIs instead of partial
clones.
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fetch-pack.c b/fetch-pack.c index 289121038e..0f1a84c061 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -896,7 +896,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 |