Skip to contentSkip to conversation

rebase -i: fix reword when using a terminal editor

PATCH Applied Stephen Boyd 3 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rebase -i: fix reword when using a terminal editor

We don't want to use output() on git-commit --amend when rewording the commit message. This leads to confusion as the editor is run in a subshell with it's output saved away, leaving the user with a seemingly frozen terminal.

Fix by removing the output part.

---

On top of next.

I think this is right, although I'm not really experienced in the rebase -i code

 git-rebase--interactive.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
git-rebase--interactive.sh +1 -1
index a43ee22..a1879e3 100755
@@ -346,7 +346,7 @@ do_next () {
 		mark_action_done
 		pick_one $sha1 ||
 			die_with_patch $sha1 "Could not apply $sha1... $rest"
-		output git commit --amend
+		git commit --amend
 		;;
 	edit|e)
 		comment_for_reflog edit
Signature · 1 line
1.6.5.103.g6b436.dirty
#1 lore raw

2009/10/16 Stephen Boyd <[email protected]>:

Quoted 7 lines

We don't want to use output() on git-commit --amend when rewording the commit message. This leads to confusion as the editor is run in a subshell with it's output saved away, leaving the user with a seemingly frozen terminal.

Fix by removing the output part.

Quoted 7 lines

---

On top of next.

I think this is right, although I'm not really experienced in the rebase -i code

Thanks!

Yes, it seems right to me too after a more thorough reading of the existing rebase -i code. It seems that 'output' is only used for non-interactive commands.

I never noticed the problem because I use 'emacsclient' as my commit editor. I didn't think of testing with an editor that run in the terminal window.

/Björn

Signature · 1 line
Björn Gustavsson, Erlang/OTP, Ericsson AB