diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-09-29 22:28:12 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-29 22:28:12 -0700 |
commit | 68a31b7d956e958f1b51e80f6cb91858e416c95d (patch) | |
tree | 8b260e1da7ef80c08a1535c2f719d15bfc7f9178 /git-rebase.sh | |
parent | f5fd2a7d179a8bb843ec44d2a594e6ccf50dfb3a (diff) | |
parent | 9c8e1011b9f6979777946ff87aae7b5846ed20a7 (diff) | |
download | git-68a31b7d956e958f1b51e80f6cb91858e416c95d.tar.gz |
Merge branch 'aw/rebase-i-edit-todo'
Teach an option to edit the insn sheet to "git rebase -i".
* aw/rebase-i-edit-todo:
rebase -i: suggest using --edit-todo to fix an unknown instruction
rebase -i: Add tests for "--edit-todo"
rebase -i: Teach "--edit-todo" action
rebase -i: Refactor help messages for todo file
rebase usage: subcommands can not be combined with -i
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-x | git-rebase.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/git-rebase.sh b/git-rebase.sh index 15da926ce0..b2f1c76dc3 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -8,7 +8,7 @@ OPTIONS_KEEPDASHDASH= OPTIONS_SPEC="\ git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>] git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>] -git-rebase [-i] --continue | --abort | --skip +git-rebase --continue | --abort | --skip | --edit-todo -- Available options are v,verbose! display a diffstat of what changed upstream @@ -38,6 +38,7 @@ C=! passed to 'git apply' continue! continue abort! abort and check out the original branch skip! skip current patch and continue +edit-todo! edit the todo list during an interactive rebase " . git-sh-setup . git-sh-i18n @@ -190,7 +191,7 @@ do --verify) ok_to_skip_pre_rebase= ;; - --continue|--skip|--abort) + --continue|--skip|--abort|--edit-todo) test $total_argc -eq 2 || usage action=${1##--} ;; @@ -306,6 +307,11 @@ then fi fi +if test "$action" = "edit-todo" && test "$type" != "interactive" +then + die "$(gettext "The --edit-todo action can only be used during interactive rebase.")" +fi + case "$action" in continue) # Sanity check @@ -338,6 +344,9 @@ abort) rm -r "$state_dir" exit ;; +edit-todo) + run_specific_rebase + ;; esac # Make sure no rebase is in progress |