MCPcopy Create free account
hub / github.com/git/git / get_cleanup_mode

Function get_cleanup_mode

sequencer.c:684–701  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

682}
683
684enum commit_msg_cleanup_mode get_cleanup_mode(const char *cleanup_arg,
685 int use_editor)
686{
687 if (!cleanup_arg || !strcmp(cleanup_arg, "default"))
688 return use_editor ? COMMIT_MSG_CLEANUP_ALL :
689 COMMIT_MSG_CLEANUP_SPACE;
690 else if (!strcmp(cleanup_arg, "verbatim"))
691 return COMMIT_MSG_CLEANUP_NONE;
692 else if (!strcmp(cleanup_arg, "whitespace"))
693 return COMMIT_MSG_CLEANUP_SPACE;
694 else if (!strcmp(cleanup_arg, "strip"))
695 return COMMIT_MSG_CLEANUP_ALL;
696 else if (!strcmp(cleanup_arg, "scissors"))
697 return use_editor ? COMMIT_MSG_CLEANUP_SCISSORS :
698 COMMIT_MSG_CLEANUP_SPACE;
699 else
700 die(_("Invalid cleanup mode %s"), cleanup_arg);
701}
702
703/*
704 * NB using int rather than enum cleanup_mode to stop clang's

Callers 6

populate_opts_cbFunction · 0.85
run_sequencerFunction · 0.85
suggest_conflictsFunction · 0.85
cmd_mergeFunction · 0.85
cmd_pullFunction · 0.85
cmd_commitFunction · 0.85

Calls 1

dieFunction · 0.70

Tested by

no test coverage detected