Code

Merge branch 'tr/maint-bundle-boundary' into maint-1.7.8
[git.git] / git-rebase--interactive.sh
index 863597c6190bc4bd3f753676595861e80d7cd39b..5812222eb9afa2b2903040d7cf32ab0fb33c3508 100644 (file)
@@ -176,6 +176,19 @@ do_with_author () {
        )
 }
 
+git_sequence_editor () {
+       if test -z "$GIT_SEQUENCE_EDITOR"
+       then
+               GIT_SEQUENCE_EDITOR="$(git config sequence.editor)"
+               if [ -z "$GIT_SEQUENCE_EDITOR" ]
+               then
+                       GIT_SEQUENCE_EDITOR="$(git var GIT_EDITOR)" || return $?
+               fi
+       fi
+
+       eval "$GIT_SEQUENCE_EDITOR" '"$@"'
+}
+
 pick_one () {
        ff=--ff
        case "$1" in -n) sha1=$2; ff= ;; *) sha1=$1 ;; esac
@@ -842,7 +855,7 @@ has_action "$todo" ||
        die_abort "Nothing to do"
 
 cp "$todo" "$todo".backup
-git_editor "$todo" ||
+git_sequence_editor "$todo" ||
        die_abort "Could not execute editor"
 
 has_action "$todo" ||