MitMaro / git-interactive-rebase-tool

Native cross-platform full feature terminal-based sequence editor for git interactive rebase.
https://gitrebasetool.mitmaro.ca/
GNU General Public License v3.0
1.59k stars 48 forks source link

Doesn't work with xargs anymore #489

Closed maltsev closed 1 year ago

maltsev commented 3 years ago

Hey,

I'm using your tool for a couple of years now. It's great and helps me a lot in my work. Thanks!

Recently I have noticed that one of my rebase commands has stopped working:

echo $COMMIT_HASH | xargs -o git rebase --interactive

After I run it, the terminal window starts to constantly rerender (multiple times per second) and didn't react to key presses at all. So I have to kill it. I tested it both in the default Terminal.app and iTerm2. I'm using macOS 11.3.1.

Not sure if it's directly related to xargs or something else. Let me know if you need me to provide more info or check something else.

MitMaro commented 3 years ago

Thanks for the report!

This is interesting. I just gave a test on Linux, but it doesn't seem to happen there. It's probably a macOS specific bug, which are always a pain.

That the tool is constantly rendering and ignoring your key presses, leads me to believe there is something happening with the input handling. As a render is only triggered where there is some sort of input.

I will take a look this week when I am back on a Mac.

MitMaro commented 3 years ago

I looked into the problem, and it seems that this is an upstream issue that is currently blocked by another upstream issue.

With the latest release, this project started to use Crossterm to address some issues with Windows. While this brought in several advantages for all operating systems, it sadly broke support for TTY redirection on macOS.

I will keep this issue open to track the upstream issue, and hopefully in the future this can be fixed. Sadly, the only advice I can give at the moment is to not use the pipe and xargs, which I know isn't really a satisfactory answer.

MitMaro commented 1 year ago

The upstream issue causing this to work may have been fixed. I need to update with the latest version of Crossterm and see if there are other changes that can be made, but 🤞🏼 .

MitMaro commented 1 year ago

I've enabled the TTY support on macOS in the latest build, so the above use case should work again. Thanks for the report, and apologies it took so long to address.