diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-02-08 13:20:33 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-02-08 13:20:33 -0800 |
| commit | 2c90347a94277146daa74149c0af9d6466b66606 (patch) | |
| tree | ac0a71a3f5f2b076613f3fcff38682a4eb470bac /builtin/index-pack.c | |
| parent | Merge branch 'cp/unit-test-prio-queue' (diff) | |
| parent | index-pack: --fsck-objects to take an optional argument for fsck msgs (diff) | |
| download | git-2c90347a94277146daa74149c0af9d6466b66606.tar.gz git-2c90347a94277146daa74149c0af9d6466b66606.zip | |
Merge branch 'jc/index-pack-fsck-levels'
The "--fsck-objects" option of "git index-pack" now can take the
optional parameter to tweak severity of different fsck errors.
* jc/index-pack-fsck-levels:
index-pack: --fsck-objects to take an optional argument for fsck msgs
index-pack: test and document --strict=<msg-id>=<severity>...
Diffstat (limited to 'builtin/index-pack.c')
| -rw-r--r-- | builtin/index-pack.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 1ea87e01f2..a3a37bd215 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -24,7 +24,7 @@ #include "setup.h" static const char index_pack_usage[] = -"git index-pack [-v] [-o <index-file>] [--keep | --keep=<msg>] [--[no-]rev-index] [--verify] [--strict] (<pack-file> | --stdin [--fix-thin] [<pack-file>])"; +"git index-pack [-v] [-o <index-file>] [--keep | --keep=<msg>] [--[no-]rev-index] [--verify] [--strict[=<msg-id>=<severity>...]] [--fsck-objects[=<msg-id>=<severity>...]] (<pack-file> | --stdin [--fix-thin] [<pack-file>])"; struct object_entry { struct pack_idx_entry idx; @@ -1785,8 +1785,9 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix) } else if (!strcmp(arg, "--check-self-contained-and-connected")) { strict = 1; check_self_contained_and_connected = 1; - } else if (!strcmp(arg, "--fsck-objects")) { + } else if (skip_to_optional_arg(arg, "--fsck-objects", &arg)) { do_fsck_object = 1; + fsck_set_msg_types(&fsck_options, arg); } else if (!strcmp(arg, "--verify")) { verify = 1; } else if (!strcmp(arg, "--verify-stat")) { |
