Open ckorris-imt opened 1 year ago
If this reproduces with regular Cygwin, it is probably something we have to live with.
If this reproduces with regular Cygwin, it is probably something we have to live with.
@ckorris-imt does it reproduce with regular Cygwin?
@dscho Haven't yet had a chance to try but I've got a reminder set on my phone to do it soon.
This has been happening to me as well. I started noticing it in 2.41. I feel like it got slightly better in 2.42, but it's still a major problem. I'm unable to repro the issue in Cygwin 3.4.9.
This has been happening to me as well. I started noticing it in 2.41. I feel like it got slightly better in 2.42, but it's still a major problem. I'm unable to repro the issue in Cygwin 3.4.9.
Did you enable pseudo Console support?
Did you enable pseudo Console support?
Not that I'm aware of. I just installed the same as always. This is on Windows 11, BTW.
Did you enable pseudo Console support?
Not that I'm aware of. I just installed the same as always. This is on Windows 11, BTW.
For various reasons, Git for Windows still defaults to turning off Pseudo Console support, while Cygwin is "all in". Could you reinstall Git for Windows, toggling Pseudo Console support on, and test again, please?
For various reasons, Git for Windows still defaults to turning off Pseudo Console support, while Cygwin is "all in". Could you reinstall Git for Windows, toggling Pseudo Console support on, and test again, please?
Just did that and it seems much better now, thank you for the tip!
That is confirmed to be the fix on my end, as well. Thank you!
Hi there,
here are other problematic use cases probably sharing the same root cause:
A commit-msg hook calling git (any subcommand with no - or redirected to file - output) will mess up carriage return in the stdout result. My real-world example is the Gerrit one. A minimized example is a commit-msg with a "git stripspace" call resulting in shifted shell prompt:
$ git commit -m 'Commit header' --allow-empty
[master 8d021b2a] Commit header
$
A commit-msg with multiple git commands outputing to stdout will fail with a hidden bad stdout descriptor error. I don't have a real-world use case but I discovered that while investigating the previous problem and I thought it was worth sharing. Here would be a commented commit-msg demonstration hook:
#!/bin/sh
git log -1 # ok, visible in stdout
git log -1 2> error.txt # broken, the stderr content is "fatal: write failure on 'stdout': Bad file descriptor"
echo $? > retcode.txt # the retcode is 128
Advanced aliases calling git multiple times are broken; the bad stdout descriptors striking again. I do have real-world personal aliases affected (not worth sharing here). Short demonstration:
$ git config -l | grep broken
alias.not-broken=!f() { git log -1;}; f
alias.broken=!f() { git log -1 && git log -1;}; f
$ git not-broken
commit 555ea07c (HEAD -> master)
Author: Me
Date: Wed Sep 20 12:25:35 2023 +0200
Commit header
$ echo $?
0
$ git broken
commit 555ea07c (HEAD -> master)
Author: Me
Date: Wed Sep 20 12:25:35 2023 +0200
Commit header
$ echo $?
128
$
Those new use cases all share the so-far discovered workarounds:
I hope this helps assessing the issue severity and moving its analysis forward. To me, that 2.42 git version is too broken to be used without pseudo console support. Note that I have no objection activating it, quite the opposite given the side benefits. It's just that the "experimental" classification in the installer kept me away from it so far. If Cygwin opted for it by default, I guess it's not that experimental anymore.
I guess we'll have to switch to enabling Pseudo Console support for all ☹️
I guess we'll have to switch to enabling Pseudo Console support for all ☹️
What are the Pseudo Console activation drawbacks?
What are the Pseudo Console activation drawbacks?
I am still not convinced of the quality of the code. There has been a relatively steady stream of bug reports followed up by fixes that were neither well-described nor well-contained, it often seemed as if they were only addressing symptoms and not root causes.
But that steady stream did wane a little. What has increased are the problems with non-Pseudo Console code that was supposed to be left alone by Pseudo Console support but wasn't.
So at this stage it might be a "damned if you don't, damned if you do" situation.
For how long was the pseudo console support enabled due to another bug that switched the setting? Maybe factor that in in your decision? It may have been longer under test than thought.
Best regards, Mike
On Fri, Sep 22, 2023, 8:29 AM Johannes Schindelin @.***> wrote:
What are the Pseudo Console activation drawbacks?
I am still not convinced of the quality of the code. There has been a relatively steady stream of bug reports followed up by fixes that were neither well-described nor well-contained, it often seemed as if they were only addressing symptoms and not root causes.
But that steady stream did wane a little. What has increased are the problems with non-Pseudo Console code that was supposed to be left alone by Pseudo Console support but wasn't.
So at this stage it might be a "damned if you don't, damned if you do" situation.
— Reply to this email directly, view it on GitHub https://github.com/git-for-windows/git/issues/4603#issuecomment-1731333703, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZH5SGEPDZUKX3TVLSKTC3X3WADRANCNFSM6AAAAAA4VAFZ4M . You are receiving this because you are subscribed to this thread.Message ID: @.***>
For how long was the pseudo console support enabled
As per the explanation in https://github.com/git-for-windows/build-extra/pull/522, it was enabled by mistake in v2.41.0 and that bug was fixed in v2.42.0(2). That's equivalent to about 8 weeks and while v2.41.0's installer was downloaded over 2.7 million times, the v2.42.0 one was downloaded only just over 800k times. And since I cannot add any telemetry without having to fear for my own life at the hands of some very opinionated people, I cannot say how many of those downloaded installers were actually run, let alone in how many instances they were followed by frustrated downgrades to the previous Git for Windows version.
In other words: I am deprived of any dependable data to support making that decision.
While using the Bash terminal in 2.42, I am not able to "stack" commands, where if I enter a command that takes some time to execute, and while it's executing, enter a second command and press enter, the second command will resolve after the first is done. In 2.42, the second command is ignored.
This happened after upgrading after a fresh Windows install. However, I verified that going back to 2.41 removes the issue, and then coming back to 2.42 brings the issue back. I use all default settings.
Setup
Version 2.42.0. Uninstalling to 2.41.0 solved the problem. Both 64-bit. I had previously tried uninstalling and reinstalling, clearing my settings, etc. Doing the exact same thing but with 2.41.0 fixed it, Doing the exact same thing again with 2.42 brought it back.
Windows 10 64-bit
I chose all the defaults - MinTTY, Vim, etc.
insert your response here
Details
Bash. I have not tried others.
After typing
git fetch
, pressing enter, and then typinggit status
and pressing enter before the fetch was finished, I expected it to then complete the status command afterwards.After the fetch was done, it did not do anything, as if I had not entered a second command.
It it not repository specific.