#include "git-compat-util.h" #include "commit.h" #include "editor.h" #include "environment.h" #include "gettext.h" #include "sequencer.h" #include "rebase-interactive.h" #include "repository.h" #include "strbuf.h" #include "commit-slab.h" #include "config.h" #include "dir.h" #include "object-name.h" static const char edit_todo_list_advice[] = N_("You can fix this with 'git rebase --edit-todo' " "and then run 'git rebase --continue'.\n" "Or you can abort the rebase with 'git rebase" " --abort'.\n"); enum missing_commit_check_level { MISSING_COMMIT_CHECK_IGNORE = 0, MISSING_COMMIT_CHECK_WARN, MISSING_COMMIT_CHECK_ERROR }; static enum missing_commit_check_level get_missing_commit_check_level(void) { const char *value; if (git_config_get_value("rebase.missingcommitscheck", &value) || !strcasecmp("ignore", value)) return MISSING_COMMIT_CHECK_IGNORE; if (!strcasecmp("warn", value)) return MISSING_COMMIT_CHECK_WARN; if (!strcasecmp("error", value)) return MISSING_COMMIT_CHECK_ERROR; warning(_("unrecognized setting %s for option " "rebase.missingCommitsCheck. Ignoring."), value); return MISSING_COMMIT_CHECK_IGNORE; } void append_todo_help(int command_count, const char *shortrevisions, const char *shortonto, struct strbuf *buf) { const char *msg = _("\nCommands:\n" "p, pick = use commit\n" "r, reword = use commit, but edit the commit message\n" "e, edit = use commit, but stop for amending\n" "s, squash = use commit, but meld into previous commit\n" "f, fixup [-C | -c] = like \"squash\" but keep only the previous\n" " commit's log message, unless -C is used, in which case\n" " keep only this commit's message; -c is same as -C but\n" " opens the editor\n" "x, exec = run command (the rest of the line) using shell\n" "b, break = stop here (continue rebase later with 'git rebase --continue')\n" "d, drop = remove commit\n" "l, label