git-for-windows / git

A fork of Git containing Windows-specific patches.
http://gitforwindows.org/
Other
8.32k stars 2.52k forks source link

regression in Git 2.42+: in Git Bash a command is not run if it was typed before previous command is finished #5036

Closed gh-user-2022 closed 3 months ago

gh-user-2022 commented 3 months ago

Setup

$ git --version --build-options

git version 2.45.2.windows.1
cpu: x86_64
built from commit: 91d03cb2e4fbf6ad961ace739b8a646868cb154d
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon

Microsoft Windows [Version 10.0.19044.4412]


 - What options did you set as part of the installation? Or did you choose the
   defaults?

$ cat /etc/install-options.txt

Editor Option: VIM Custom Editor Path: Default Branch Option: Path Option: Cmd SSH Option: OpenSSH Tortoise Option: false CURL Option: OpenSSL CRLF Option: CRLFAlways Bash Terminal Option: MinTTY Git Pull Behavior Option: Merge Use Credential Manager: Enabled Performance Tweaks FSCache: Enabled Enable Symlinks: Disabled Enable Pseudo Console Support: Disabled Enable FSMonitor: Disabled


 - Any other interesting things about your environment that might be related
   to the issue you're seeing? **No.**

### Details

 - Which terminal/shell are you running Git from? **Git Bash**

 - What commands did you run to trigger this issue?

sleep 10 echo 1

**Note: The second comand is typed before the first command is finished.**

 - What did you expect to occur after running these commands?

user@host MINGW64 ~ $ sleep 10 echo 1

user@host MINGW64 ~ $ echo 1 1


 - What actually happened instead?

user@host MINGW64 ~ $ sleep 10 echo 1

user@host MINGW64 ~ $



### Additional details and commentary.

The problem appeared in version 2.42 and is not reproduced in version 2.41.
Specifically, I checked following versions (on the same system, with same installation options), with specified result:

> git version 2.41.0.windows.1 - OK
> git version 2.42.0.windows.2 - BUG
> git version 2.43.0.windows.1 - BUG
> git version 2.44.1.windows.1 - BUG
> git version 2.45.2.windows.1 - BUG

It seems that normal (generally accepted) behavior is to execute the second command.
I confirmed the behavior in:
- Terminals in Linux distributions: RHEL 9, Ubuntu
- SSH with Bash shell
- In Windows: cmd.exe, powershell.exe, pwsh.exe

### Severity of the issue.
This is inconvenient.
I often type multiple Git commands without waiting for previous commands to finish.
So I have to revert to Git 2.41.
rimrul commented 3 months ago

Duplicate of #4603