File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -474,6 +474,12 @@ core.editor::
474
474
variable when it is set, and the environment variable
475
475
`GIT_EDITOR` is not set. See linkgit:git-var[1].
476
476
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
+
477
483
core.pager::
478
484
The command that git will use to paginate output. Can
479
485
be overridden with the `GIT_PAGER` environment
Original file line number Diff line number Diff line change @@ -161,6 +161,19 @@ do_with_author () {
161
161
)
162
162
}
163
163
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
+
164
177
pick_one () {
165
178
ff=--ff
166
179
case " $1 " in -n) sha1=$2 ; ff= ;; * ) sha1=$1 ;; esac
@@ -832,7 +845,7 @@ has_action "$todo" ||
832
845
die_abort " Nothing to do"
833
846
834
847
cp " $todo " " $todo " .backup
835
- git_editor " $todo " ||
848
+ git_sequence_editor " $todo " ||
836
849
die_abort " Could not execute editor"
837
850
838
851
has_action " $todo " ||
You can’t perform that action at this time.
0 commit comments