l10n: sv.po: Update Swedish translation (3288t0f0u)
[gitweb.git] / builtin / rebase--helper.c
index 1102ecb43b679587ae934cc6b9be5fdc4cb72a8b..7daee544b7b4cf3495355e1c6e597272d7b66440 100644 (file)
@@ -13,9 +13,11 @@ int cmd_rebase__helper(int argc, const char **argv, const char *prefix)
 {
        struct replay_opts opts = REPLAY_OPTS_INIT;
        unsigned flags = 0, keep_empty = 0;
+       int abbreviate_commands = 0;
        enum {
                CONTINUE = 1, ABORT, MAKE_SCRIPT, SHORTEN_OIDS, EXPAND_OIDS,
-               CHECK_TODO_LIST, SKIP_UNNECESSARY_PICKS, REARRANGE_SQUASH
+               CHECK_TODO_LIST, SKIP_UNNECESSARY_PICKS, REARRANGE_SQUASH,
+               ADD_EXEC
        } command = 0;
        struct option options[] = {
                OPT_BOOL(0, "ff", &opts.allow_ff, N_("allow fast-forward")),
@@ -36,10 +38,13 @@ int cmd_rebase__helper(int argc, const char **argv, const char *prefix)
                        N_("skip unnecessary picks"), SKIP_UNNECESSARY_PICKS),
                OPT_CMDMODE(0, "rearrange-squash", &command,
                        N_("rearrange fixup/squash lines"), REARRANGE_SQUASH),
+               OPT_CMDMODE(0, "add-exec-commands", &command,
+                       N_("insert exec commands in todo list"), ADD_EXEC),
                OPT_END()
        };
 
        git_config(git_default_config, NULL);
+       git_config_get_bool("rebase.abbreviatecommands", &abbreviate_commands);
 
        opts.action = REPLAY_INTERACTIVE_REBASE;
        opts.allow_ff = 1;
@@ -49,6 +54,7 @@ int cmd_rebase__helper(int argc, const char **argv, const char *prefix)
                        builtin_rebase_helper_usage, PARSE_OPT_KEEP_ARGV0);
 
        flags |= keep_empty ? TODO_LIST_KEEP_EMPTY : 0;
+       flags |= abbreviate_commands ? TODO_LIST_ABBREVIATE_CMDS : 0;
        flags |= command == SHORTEN_OIDS ? TODO_LIST_SHORTEN_IDS : 0;
 
        if (command == CONTINUE && argc == 1)
@@ -65,5 +71,7 @@ int cmd_rebase__helper(int argc, const char **argv, const char *prefix)
                return !!skip_unnecessary_picks();
        if (command == REARRANGE_SQUASH && argc == 1)
                return !!rearrange_squash();
+       if (command == ADD_EXEC && argc == 2)
+               return !!sequencer_add_exec_commands(argv[1]);
        usage_with_options(builtin_rebase_helper_usage, options);
 }