diff options
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-x | git-rebase.sh | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/git-rebase.sh b/git-rebase.sh index f2742aa05..023a6dc94 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -139,10 +139,26 @@ finish_rb_merge () { } is_interactive () { - test -f "$dotest"/interactive || - while :; do case $#,"$1" in 0,|*,-i|*,--interactive) break ;; esac + while test $# != 0 + do + case "$1" in + -i|--interactive) + interactive_rebase=explicit + break + ;; + -p|--preserve-merges) + interactive_rebase=implied + ;; + esac shift - done && test -n "$1" + done + + if [ "$interactive_rebase" = implied ]; then + GIT_EDITOR=: + export GIT_EDITOR + fi + + test -n "$interactive_rebase" || test -f "$dotest"/interactive } run_pre_rebase_hook () { |