cygporter / git

Cygwin Git packaging paraphernalia
2 stars 2 forks source link

`interactive.singlekey` configuration not working as expected #57

Open me-and opened 1 year ago

me-and commented 1 year ago

Reported at https://cygwin.com/pipermail/cygwin/2022-August/252132.html:

I update recently all cygwin packages and after that git add -p stop working correctly. (previous update I did around 2 month ago) I use mintty on Windows 10 x64, and have set git config --global interactive.singlekey true when I run this command whole terminal freeze and show message from git: warning: reading single keystrokes not supported on this platform; reading line instead mintty stop accepting any input even Ctrl-C. I tried to revert mintty and git to older version but every one available have same behavior. For now disabling singlekey make this git operation work again but this is big lose in productivity.

Yankes commented 1 year ago

I look this bug, Ctrl-C "works" but its teat as normal character and enter still is working (lack of visual feedback is confusing). After hacking around compat/terminal.c I find that adding:

#define HAVE_DEV_TTY

fix this whole problem and interactive.singlekey it work again as advertised.

me-and commented 1 year ago

Ah, good to know! I'll do a bit of digging and work out how that should get plumbed in properly. I'm a bit wary of just adding the #define, in case adding it causes more problems than it solves, but that information is an incredibly useful starting point!

Yankes commented 1 year ago

Yes, it would be crude hack (and I plan do it for myself locally) but for more proper fix (even for main git branch) could be: in file config.mak.uname do setting HAVE_DEV_TTY = YesPlease for Cygwin. I did not check it yet, but I hope it could work.