mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-04 10:34:55 +02:00
Override GIT_SEQUENCE_EDITOR for rebase commands
I noticed that `$GIT_SEQUENCE_EDITOR` is overridden in `PrepareInteractiveRebaseCommand` but not in `runSkipEditorCommand`. Before this change, some commands such as `SquashAllAboveFixupCommits` would not work when a different sequence editor, e.g. [git-interactive-rebase-tool](https://github.com/MitMaro/git-interactive-rebase-tool) is configured.
This commit is contained in:
parent
1bb138c79c
commit
bc7873144e
@ -332,6 +332,7 @@ func (self *RebaseCommands) runSkipEditorCommand(cmdObj oscommands.ICmdObj) erro
|
|||||||
AddEnvVars(
|
AddEnvVars(
|
||||||
daemon.DaemonKindEnvKey+"="+string(daemon.ExitImmediately),
|
daemon.DaemonKindEnvKey+"="+string(daemon.ExitImmediately),
|
||||||
"GIT_EDITOR="+lazyGitPath,
|
"GIT_EDITOR="+lazyGitPath,
|
||||||
|
"GIT_SEQUENCE_EDITOR="+lazyGitPath,
|
||||||
"EDITOR="+lazyGitPath,
|
"EDITOR="+lazyGitPath,
|
||||||
"VISUAL="+lazyGitPath,
|
"VISUAL="+lazyGitPath,
|
||||||
).
|
).
|
||||||
|
@ -62,6 +62,7 @@ func TestRebaseSkipEditorCommand(t *testing.T) {
|
|||||||
`^VISUAL=.*$`,
|
`^VISUAL=.*$`,
|
||||||
`^EDITOR=.*$`,
|
`^EDITOR=.*$`,
|
||||||
`^GIT_EDITOR=.*$`,
|
`^GIT_EDITOR=.*$`,
|
||||||
|
`^GIT_SEQUENCE_EDITOR=.*$`,
|
||||||
"^" + daemon.DaemonKindEnvKey + "=" + string(daemon.ExitImmediately) + "$",
|
"^" + daemon.DaemonKindEnvKey + "=" + string(daemon.ExitImmediately) + "$",
|
||||||
} {
|
} {
|
||||||
regexStr := regexStr
|
regexStr := regexStr
|
||||||
|
Loading…
Reference in New Issue
Block a user