From e49ca974d6ff2dda1ff4ee39e7cc33af33d1eb2a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Gustavsson?= Date: Sat, 19 Dec 2009 13:04:03 +0100 Subject: [PATCH] rebase -i: abort cleanly if the editor fails to launch MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- git-rebase--interactive.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 3853b513b..5014ae057 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -770,7 +770,7 @@ EOF cp "$TODO" "$TODO".backup git_editor "$TODO" || - die "Could not execute editor" + die_abort "Could not execute editor" has_action "$TODO" || die_abort "Nothing to do" -- 2.30.2