tig icon indicating copy to clipboard operation
tig copied to clipboard

Error when executing `:!git commit --amend`

Open MartyLake opened this issue 1 year ago • 2 comments

In tig, executing :!git commit --amend tries to call EDITOR, in my case vim, but fails, displaying

vim input is not a from terminal vim output is not from terminal

after that, tig is unresponsive and I have to close this terminal and open a new one.

Is there a way to call git commit --amend from tig that does not suffer from this issue ?

MartyLake avatar Jun 13 '23 17:06 MartyLake

On Tue, Jun 13, 2023 at 10:45:05AM -0700, Matthieu Talbot wrote:

In tig, executing :!git commit --amend tries to call EDITOR, in my case vim, but fails, displaying

vim input is not a from terminal vim output is not from terminal

after that, tig is unresponsive and I have to close this terminal and open a new one.

confirmed. We could probably loan the tty to the subprocess here.

Is there a way to call git commit --amend from tig that does not suffer from this issue ?

meanwhile you can do

bind generic aca !git commit --amend

or

bind generic aca >git commit --amend

-- Reply to this email directly or view it on GitHub: https://github.com/jonas/tig/issues/1285 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

krobelus avatar Jun 13 '23 18:06 krobelus

Thanks for the bind trick!

MartyLake avatar Jun 13 '23 18:06 MartyLake

As per man tigmanual you want to do :exec !git commit --amend to leave the tty to the subprocess.

koutcher avatar Apr 01 '24 11:04 koutcher