diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-07-08 23:53:11 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-07-08 23:53:11 +0200 |
commit | 125e38947087906be17fb4e237fc09764df97c65 (patch) | |
tree | d3a5a64bacceb6485f186f99048cce117de76dbc /bundle-uri.c | |
parent | Merge branch 'ps/leakfixes-more' (diff) | |
parent | unbundle: extend object verification for fetches (diff) | |
download | git-125e38947087906be17fb4e237fc09764df97c65.tar.xz git-125e38947087906be17fb4e237fc09764df97c65.zip |
Merge branch 'xx/bundie-uri-fixes'
When bundleURI interface fetches multiple bundles, Git failed to
take full advantage of all bundles and ended up slurping duplicated
objects.
* xx/bundie-uri-fixes:
unbundle: extend object verification for fetches
fetch-pack: expose fsckObjects configuration logic
bundle-uri: verify oid before writing refs
Diffstat (limited to 'bundle-uri.c')
-rw-r--r-- | bundle-uri.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bundle-uri.c b/bundle-uri.c index 804fbcfbfa..1e0ee156ba 100644 --- a/bundle-uri.c +++ b/bundle-uri.c @@ -11,6 +11,7 @@ #include "hashmap.h" #include "pkt-line.h" #include "config.h" +#include "fetch-pack.h" #include "remote.h" static struct { @@ -375,7 +376,7 @@ static int unbundle_from_file(struct repository *r, const char *file) * the prerequisite commits. */ if ((result = unbundle(r, &header, bundle_fd, NULL, - VERIFY_BUNDLE_QUIET))) + VERIFY_BUNDLE_QUIET | (fetch_pack_fsck_objects() ? VERIFY_BUNDLE_FSCK : 0)))) return 1; /* @@ -402,8 +403,7 @@ static int unbundle_from_file(struct repository *r, const char *file) refs_update_ref(get_main_ref_store(the_repository), "fetched bundle", bundle_ref.buf, oid, has_old ? &old_oid : NULL, - REF_SKIP_OID_VERIFICATION, - UPDATE_REFS_MSG_ON_ERR); + 0, UPDATE_REFS_MSG_ON_ERR); } bundle_header_release(&header); |