diff options
author | shejialuo <shejialuo@gmail.com> | 2024-08-08 19:27:28 +0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-08 09:36:53 -0700 |
commit | bf061d26c7a595f1f46510aa584d50be1b1edb93 (patch) | |
tree | 054616ecdc6fa8a604bc6ac05538b5fae45208a7 /commit.c | |
parent | ab6f79d8df7c7799ed38229eb56811fda36853ae (diff) |
builtin/refs: add verify subcommand
Introduce a new subcommand "verify" in git-refs(1) to allow the user to
check the reference database consistency and also this subcommand will
be used as the entry point of checking refs for "git-fsck(1)".
Add "verbose" field into "fsck_options" to indicate whether we should
print verbose messages when checking refs and objects consistency.
Remove bit-field for "strict" field, this is because we cannot take
address of a bit-field which makes it unhandy to set member variables
when parsing the command line options.
The "git-fsck(1)" declares "fsck_options" variable with "static"
identifier which avoids complaint by the leak-checker. However, in
"git-refs verify", we need to do memory clean manually. Thus add
"fsck_options_clear" function in "fsck.c" to provide memory clean
operation.
Mentored-by: Patrick Steinhardt <ps@pks.im>
Mentored-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: shejialuo <shejialuo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions