You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make changes in at least two separate places in a file
Run GIT_EDITOR='"C:\Program Files\Notepad++\notepad++.exe" -multiInst -notabbar -nosession -noPlugin' git add -p to interactively stage parts of the file
Obviously you will need Notepad++ installed, and you may need to adjust the path to it
Type e to edit the first hunk (Notepad++ will open)
Make whatever change you like within one of the new lines (starting with a plus)
Save and close Notepad++
See that git moves on and prompts for the next hunk
Try to type n to skip the next hunk (or anything else)
See that git is stuck (Ctrl+C won't interrupt it)
The same issue happens with git add -i instead of git add -p, but requires more steps between steps 4/5.
The issue does not happen if any of the following are true:
You use vanilla Git Bash instead of Git Bash in Windows Terminal
You use cygwin instead of Git Bash in Windows Terminal (with a slightly different GIT_EDITOR value to account for differences in path handling)
You only edit the last hunk
You use a terminal editor instead of Notepad++ (I tried vim and nano)
You use /c/Windows/System32/notepad.exe instead of Notepad++
The bug still happens if you just use 'notepad', which is a shell script in Git Bash located at /usr/bin/notepad
What did you expect to occur after running these commands?
Input would be accepted for dealing with the next hunk, and git would not hang.
What actually happened instead?
Input is not accepted (or at least not echoed), and git hangs.
If the problem was occurring with a specific repository, can you provide the
URL to that repository to help us with testing?
Not repository specific.
The text was updated successfully, but these errors were encountered:
Previously reported at microsoft/terminal#16553 and msys2/msys2.github.io#307.
Setup
Seen with both versions 2.42.0.windows.2 and 2.43.0.windows.1 (64-bit)
Seen on both version 10.0.19044.3930 and 10.0.22621.2861
defaults?
to the issue you're seeing?
I don't think so, but I'm happy to answer further questions.
Details
Git Bash in Windows Terminal
Minimal, Complete, and Verifiable example
this will help us understand the issue.
GIT_EDITOR='"C:\Program Files\Notepad++\notepad++.exe" -multiInst -notabbar -nosession -noPlugin' git add -p
to interactively stage parts of the fileThe same issue happens with
git add -i
instead ofgit add -p
, but requires more steps between steps 4/5.The issue does not happen if any of the following are true:
You use vanilla Git Bash instead of Git Bash in Windows Terminal
You use cygwin instead of Git Bash in Windows Terminal (with a slightly different GIT_EDITOR value to account for differences in path handling)
You only edit the last hunk
You use a terminal editor instead of Notepad++ (I tried vim and nano)
You use /c/Windows/System32/notepad.exe instead of Notepad++
What did you expect to occur after running these commands?
Input would be accepted for dealing with the next hunk, and git would not hang.
Input is not accepted (or at least not echoed), and git hangs.
URL to that repository to help us with testing?
Not repository specific.
The text was updated successfully, but these errors were encountered: