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

Function parse_autocorrect

help.c:549–570  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547#define AUTOCORRECT_IMMEDIATELY (-1)
548
549static int parse_autocorrect(const char *value)
550{
551 switch (git_parse_maybe_bool_text(value)) {
552 case 1:
553 return AUTOCORRECT_IMMEDIATELY;
554 case 0:
555 return AUTOCORRECT_SHOW;
556 default: /* other random text */
557 break;
558 }
559
560 if (!strcmp(value, "prompt"))
561 return AUTOCORRECT_PROMPT;
562 if (!strcmp(value, "never"))
563 return AUTOCORRECT_NEVER;
564 if (!strcmp(value, "immediate"))
565 return AUTOCORRECT_IMMEDIATELY;
566 if (!strcmp(value, "show"))
567 return AUTOCORRECT_SHOW;
568
569 return 0;
570}
571
572static int git_unknown_cmd_config(const char *var, const char *value,
573 const struct config_context *ctx,

Callers 1

git_unknown_cmd_configFunction · 0.85

Calls 1

Tested by

no test coverage detected