Merge branch 'vd/scalar-generalize-diagnose'

Portability fix.

* vd/scalar-generalize-diagnose:
  builtin/diagnose.c: don't translate the two mode values
  diagnose.c: refactor to safely use 'd_type'
This commit is contained in:
Junio C Hamano
2022-09-21 15:27:01 -07:00
3 changed files with 69 additions and 15 deletions

View File

@ -22,7 +22,7 @@ int cmd_diagnose(int argc, const char **argv, const char *prefix)
N_("specify a destination for the diagnostics archive")),
OPT_STRING('s', "suffix", &option_suffix, N_("format"),
N_("specify a strftime format suffix for the filename")),
OPT_CALLBACK_F(0, "mode", &mode, N_("(stats|all)"),
OPT_CALLBACK_F(0, "mode", &mode, "(stats|all)",
N_("specify the content of the diagnostic archive"),
PARSE_OPT_NONEG, option_parse_diagnose),
OPT_END()