File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -474,6 +474,12 @@ core.editor::
474474 variable when it is set, and the environment variable
475475 `GIT_EDITOR` is not set. See linkgit:git-var[1].
476476
477+ sequence.editor::
478+ Text editor used by `git rebase -i` for editing the rebase insn file.
479+ The value is meant to be interpreted by the shell when it is used.
480+ It can be overridden by the `GIT_SEQUENCE_EDITOR` environment variable.
481+ When not configured the default commit message editor is used instead.
482+
477483core.pager::
478484 The command that git will use to paginate output. Can
479485 be overridden with the `GIT_PAGER` environment
Original file line number Diff line number Diff line change @@ -161,6 +161,19 @@ do_with_author () {
161161 )
162162}
163163
164+ git_sequence_editor () {
165+ if test -z " $GIT_SEQUENCE_EDITOR "
166+ then
167+ GIT_SEQUENCE_EDITOR=" $( git config sequence.editor) "
168+ if [ -z " $GIT_SEQUENCE_EDITOR " ]
169+ then
170+ GIT_SEQUENCE_EDITOR=" $( git var GIT_EDITOR) " || return $?
171+ fi
172+ fi
173+
174+ eval " $GIT_SEQUENCE_EDITOR " ' "$@"'
175+ }
176+
164177pick_one () {
165178 ff=--ff
166179 case " $1 " in -n) sha1=$2 ; ff= ;; * ) sha1=$1 ;; esac
@@ -832,7 +845,7 @@ has_action "$todo" ||
832845 die_abort " Nothing to do"
833846
834847cp " $todo " " $todo " .backup
835- git_editor " $todo " ||
848+ git_sequence_editor " $todo " ||
836849 die_abort " Could not execute editor"
837850
838851has_action " $todo " ||
You can’t perform that action at this time.
0 commit comments