jonas / tig

Text-mode interface for git
https://jonas.github.io/tig/
GNU General Public License v2.0
12.49k stars 611 forks source link

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

Closed MartyLake closed 8 months ago

MartyLake commented 1 year ago

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 ?

krobelus commented 1 year ago

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: @.***>

MartyLake commented 1 year ago

Thanks for the bind trick!

koutcher commented 8 months ago

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