# [PATCH] rebase -i: fix reword when using a terminal editor

3 messages from 2009-10-16 to 2009-10-19. Participants: Stephen Boyd, Björn Gustavsson, Junio C Hamano.
Thread: https://gitlist.dev/t/21256

## Stephen Boyd, 2009-10-16 06:32

Subject: [PATCH] rebase -i: fix reword when using a terminal editor
Message-ID: <1255674753-13949-1-git-send-email-bebarino@gmail.com>
URL: https://gitlist.dev/e/1255674753-13949-1-git-send-email-bebarino%40gmail.com

```
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.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
---

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(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index a43ee22..a1879e3 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -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
-- 
1.6.5.103.g6b436.dirty

```

## Björn Gustavsson, 2009-10-16 08:05

Subject: Re: [PATCH] rebase -i: fix reword when using a terminal editor
Message-ID: <6672d0160910160105t33ea0585r5c791d47d03f40a9@mail.gmail.com>
URL: https://gitlist.dev/e/6672d0160910160105t33ea0585r5c791d47d03f40a9%40mail.gmail.com
In-Reply-To: <1255674753-13949-1-git-send-email-bebarino@gmail.com>

```
2009/10/16 Stephen Boyd <bebarino@gmail.com>:
> 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.
>
> Signed-off-by: Stephen Boyd <bebarino@gmail.com>
> ---
>
> 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
-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB

```

## Junio C Hamano, 2009-10-19 08:05

Subject: Re: [PATCH] rebase -i: fix reword when using a terminal editor
Message-ID: <7v4opv6c6d.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v4opv6c6d.fsf%40alter.siamese.dyndns.org
In-Reply-To: <1255674753-13949-1-git-send-email-bebarino@gmail.com>

```
Thanks, applied.

```
