summaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-10-19 16:06:31 -0700
committerJunio C Hamano <gitster@pobox.com>2008-10-19 16:06:31 -0700
commitedacb101ef831cdc59d07015b1b5cd1aaddcc588 (patch)
treee03312e706ad3a285c19772189c48528b7ef3c2a /git-rebase.sh
parent4f2d651e5b3414eac5d22ff47366d22c8cc289f6 (diff)
parentf8cca019b9ea9471719505ca6ccf020feb219d98 (diff)
downloadgit-edacb101ef831cdc59d07015b1b5cd1aaddcc588.tar.gz
Merge branch 'ae/preservemerge'
* ae/preservemerge: rebase: Support preserving merges in non-interactive mode
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh22
1 files changed, 19 insertions, 3 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index f2742aa054..023a6dc94a 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 () {