Skip to content

Commit e49ca97

Browse files
bjornggitster
authored andcommitted
rebase -i: abort cleanly if the editor fails to launch
If the user's configured editor is emacsclient, the editor will fail to launch if emacs is not running and the git command that tried to lanuch the editor will abort. For most commands, all you have to do is to start emacs and repeat the command. The "git rebase -i" command, however, aborts without cleaning the "$GIT_DIR/rebase-merge" directory if it fails to launch the editor, so you'll need to do "git rebase --abort" before repeating the rebase command. Change "git rebase -i" to terminate using "die_abort" (instead of with "die") if the initial launch of the editor fails. Signed-off-by: Björn Gustavsson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent afab0fe commit e49ca97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-rebase--interactive.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ EOF
770770

771771
cp "$TODO" "$TODO".backup
772772
git_editor "$TODO" ||
773-
die "Could not execute editor"
773+
die_abort "Could not execute editor"
774774

775775
has_action "$TODO" ||
776776
die_abort "Nothing to do"

0 commit comments

Comments
 (0)