MCPcopy Index your code
hub / github.com/git/git / check_typos

Function check_typos

parse-options.c:622–640  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

620}
621
622static void check_typos(const char *arg, const struct option *options)
623{
624 if (strlen(arg) < 3)
625 return;
626
627 if (starts_with(arg, "no-")) {
628 error(_("did you mean `--%s` (with two dashes)?"), arg);
629 exit(129);
630 }
631
632 for (; options->type != OPTION_END; options++) {
633 if (!options->long_name)
634 continue;
635 if (starts_with(options->long_name, arg)) {
636 error(_("did you mean `--%s` (with two dashes)?"), arg);
637 exit(129);
638 }
639 }
640}
641
642static void parse_options_check(const struct option *opts)
643{

Callers 1

parse_options_stepFunction · 0.85

Calls 2

starts_withFunction · 0.85
errorFunction · 0.85

Tested by

no test coverage detected