-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weird interaction with git add -p and Notepad++ (git hangs) #4776
Comments
Experiencing this issue and want to track any updates. I prefer notepad++ as my general quick editor and would prefer not to have to change that or remember to change the editor before doing an add -i. |
In case it helps, I'm pretty sure I'm experiencing the same issue with VSCode as my editor. The steps to reproduce are the same, except for step 4, you want GIT_EDITOR="code --wait" assuming you have VSCode in your PATH. I switched to using vanilla Git Bash for the file where I was experiencing the issue as a workaround. |
Could you please test with Git for Windows v2.47.0-rc0? It comes with a new MSYS2 runtime version that I hope fixes this (in my tests, it did). |
Unfortunately, I see no change in behavior with that version installed. $ git --version |
@klylesatepic oh, I fear I forgot to take out the no-longer-experimental option 'Enable experimental support for pseudo consoles.'. It should be removed and turned on by default. Could I ask you to reinstall and ensure that this option is checked? |
I reinstalled and made sure that option was checked during the installation. I still see no change in behavior. |
I'm seeing the same behavior, having installed the newest rc with that
option checked, git add -i still freezes after opening notepad++.
…On Mon, Sep 30, 2024 at 11:44 AM Kevin Lyles ***@***.***> wrote:
I reinstalled and made sure that option was checked during the
installation. I still see no change in behavior.
—
Reply to this email directly, view it on GitHub
<#4776 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAKBR2YC2GR7UWW3YK6N5LZZF5WDAVCNFSM6AAAAABCLFWXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBTGY4TAMRTGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Thank you both for checking! I will try to reproduce this again, maybe it has something to do with my using the Git for Windows SDK that it started working here. |
@dscho Perhaps if you want to make sure you're testing in a clean isolated environment and can use Windows Sandbox, these personal notes of mine showing how to install Windows Terminal within the sandbox might be useful to you. There might be better tools for this, but one thing I like about Windows Sandbox is that it just works out of the box (without having to configure anything) and I can be reasonably sure that whatever I do inside is isolated from the host environment. |
The problem with that is that I need to reproduce this in an environment where I can easily develop a fix, meaning a full Git for Windows SDK from which I can open PRs. Due to time constraints, that means that I cannot afford to set up a brand new environment for every bug report I receive ☹ |
Oh never mind, I missed something and sure enough, I can still reproduce, even with Git for Windows v2.47.0-rc0 ☹ |
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: