diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-12-13 07:33:36 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-12-13 07:33:36 -0800 |
| commit | a32668829d0b23a11f47596812e74725791142a1 (patch) | |
| tree | 74ca317f4234e0b8b0fa3029291eb3dba15d6140 /bundle.c | |
| parent | caacdb5dfd60540ecec30ec479f147f3c8167e11 (diff) | |
| parent | baa159137be36965e03192528b001ffc39b8352f (diff) | |
| download | git-a32668829d0b23a11f47596812e74725791142a1.tar.gz | |
Merge branch 'jt/bundle-fsck'
"git bundle --unbundle" and "git clone" running on a bundle file
both learned to trigger fsck over the new objects with configurable
fck check levels.
* jt/bundle-fsck:
transport: propagate fsck configuration during bundle fetch
fetch-pack: split out fsck config parsing
bundle: support fsck message configuration
bundle: add bundle verification options type
Diffstat (limited to 'bundle.c')
| -rw-r--r-- | bundle.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -628,11 +628,15 @@ out: int unbundle(struct repository *r, struct bundle_header *header, int bundle_fd, struct strvec *extra_index_pack_args, - enum verify_bundle_flags flags) + struct unbundle_opts *opts) { struct child_process ip = CHILD_PROCESS_INIT; + struct unbundle_opts opts_fallback = { 0 }; - if (verify_bundle(r, header, flags)) + if (!opts) + opts = &opts_fallback; + + if (verify_bundle(r, header, opts->flags)) return -1; strvec_pushl(&ip.args, "index-pack", "--fix-thin", "--stdin", NULL); @@ -641,8 +645,9 @@ int unbundle(struct repository *r, struct bundle_header *header, if (header->filter.choice) strvec_push(&ip.args, "--promisor=from-bundle"); - if (flags & VERIFY_BUNDLE_FSCK) - strvec_push(&ip.args, "--fsck-objects"); + if (opts->flags & VERIFY_BUNDLE_FSCK) + strvec_pushf(&ip.args, "--fsck-objects%s", + opts->fsck_msg_types ? opts->fsck_msg_types : ""); if (extra_index_pack_args) strvec_pushv(&ip.args, extra_index_pack_args->v); |
