Skip to content

Commit 4c24750

Browse files
jltoblergitster
authored andcommitted
bundle: support fsck message configuration
The git-index-pack(1) spawned during `unbundle()` can be optionally configured with `--fsck-objects` to perform fsck checks on the bundle. This does not propagate fsck message severity configuration though. Extend `verify_bundle_opts` to store this information and update `unbundle()` to configure the `--fsck-objects` option appropriately. Signed-off-by: Justin Tobler <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 972000e commit 4c24750

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

bundle.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,8 @@ int unbundle(struct repository *r, struct bundle_header *header, int bundle_fd,
646646
strvec_push(&ip.args, "--promisor=from-bundle");
647647

648648
if (opts.flags & VERIFY_BUNDLE_FSCK)
649-
strvec_push(&ip.args, "--fsck-objects");
649+
strvec_pushf(&ip.args, "--fsck-objects%s",
650+
opts.fsck_msg_types ? opts.fsck_msg_types : "");
650651

651652
if (extra_index_pack_args)
652653
strvec_pushv(&ip.args, extra_index_pack_args->v);

bundle.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ int verify_bundle(struct repository *r, struct bundle_header *header,
4141

4242
struct verify_bundle_opts {
4343
enum verify_bundle_flags flags;
44+
const char *fsck_msg_types;
4445
};
4546

4647
/**

0 commit comments

Comments
 (0)