X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-rebase--interactive.sh;h=804001bb4e29873ef08d950a40cf1f1745e2aa27;hb=f0b4fd47074d8cf3f9db9c444c8e1e125e0cc517;hp=94f36c254c53366ba53d256c0bd50a1de07cdb85;hpb=e75a59adfcc4fd048690e5b25f9a8c31d8011d53;p=git.git diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 94f36c254..804001bb4 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -161,6 +161,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 @@ -832,7 +845,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" ||