threads / bug / 63772

git bash bug

Subject: git bash bug

## tl;dr

3 messages between Jul 9, 2025 and Jul 11, 2025.

replies: 2people: 3as markdown or json

Preston, David J.· Jul 9, 2025, 17:20 UTC · lore
Bug report attached.

Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue) started happening after an update to a newer version of git... has been happening for a while, so i am not sure what version it started with

What did you expect to happen? (Expected behavior) when using git bash in windows environment, when a previously typed command is executing and i start typing, i expect that what i type will eventually show up on the command line, in the order i typed it, once the executing command completes.

What happened instead? (Actual behavior) letters that i have typed show up in a different order than i typed them. basically, i think there is some async processing going on, and keyboard input is being handled in such a way that the keystrokes are output to the console in an order that is random based on race conditions in the async code.

What's different between what you expected and what actually happened? keys output in a different order than i typed them in.

Anything else you want to add:

Please review the rest of the bug report below. You can delete any lines you don't wish to share.

[System Info]
git version:
git version 2.49.0.windows.1
cpu: x86_64
built from commit: cca1f38702730b35f52c29efd62864b85e85ddcc
sizeof-long: 4
sizeof-size_t: 8
shell-path: D:/git-sdk-64-build-installers/usr/bin/sh
feature: fsmonitor--daemon
libcurl: 8.12.1
OpenSSL: OpenSSL 3.2.4 11 Feb 2025
zlib: 1.3.1
uname: Windows 10.0 22631 
compiler info: gnuc: 14.2
libc info: no libc information available
$SHELL (typically, interactive shell): C:\Program Files\Git\usr\bin\bash.exe
[Enabled Hooks]
brian m. carlson· Jul 9, 2025, 22:47 UTC · re: Preston, David J. · lore

Re: git bash bug

On 2025-07-09 at 17:20:22, Preston, David J. wrote:
Hi,
Show 8 quoted lines
> Thank you for filling out a Git bug report!
> Please answer the following questions to help us understand your issue.
> 
> What did you do before the bug happened? (Steps to reproduce your issue)
> started happening after an update to a newer version of git... has been happening for a while, so i am not sure what version it started with
> 
> What did you expect to happen? (Expected behavior)
> when using git bash in windows environment, when a previously typed command is executing and i start typing, i expect that what i type will eventually show up on the command line, in the order i typed it, once the executing command completes.

The Git project doesn't ship bash, a terminal, or any software other than the source code to Git. Git Bash is part of Git for Windows, which is a separate project. You may want to report this https://github.com/git-for-windows/git/issues.

I would recommend searching for any relevant issues, open or closed, first and providing any information that might be relevant. For instance, does this problem only occur when the system is loaded or does it happen all the time, even with little load? Is there anything else going on that is correlated with the problem (e.g., a virus scan)? Does the same thing happen when running Git for Windows's bash through Windows Terminal, or is it only the built-in MinTTY? Those kinds of things might help the maintainer solve the problem more quickly.

Best of luck on this.
-- 
brian m. carlson (they/them)
Toronto, Ontario, CA
Johannes Schindelin· Jul 11, 2025, 14:40 UTC · re: Preston, David J. · lore

Re: git bash bug

Hi David,
On Wed, 9 Jul 2025, Preston, David J. wrote:
Show 19 quoted lines
> What did you do before the bug happened? (Steps to reproduce your issue)
> started happening after an update to a newer version of git... has been
> happening for a while, so i am not sure what version it started with
>
> What did you expect to happen? (Expected behavior)
> when using git bash in windows environment, when a previously typed
> command is executing and i start typing, i expect that what i type will
> eventually show up on the command line, in the order i typed it, once
> the executing command completes.
>
> What happened instead? (Actual behavior)
> letters that i have typed show up in a different order than i typed
> them.  basically, i think there is some async processing going on, and
> keyboard input is being handled in such a way that the keystrokes are
> output to the console in an order that is random based on race
> conditions in the async code.
>
> What's different between what you expected and what actually happened?
> keys output in a different order than i typed them in.

This is essentially the same issue that has been reported at https://github.com/git-for-windows/git/issues/5632.

The problem is in the MSYS2 runtime, which is the POSIX emulation layer required to run Bash that Git for Windows employed, which in turn is a friendly fork of the Cygwin runtime.

I haven't had time to report this bug over in Cygwin yet (for which I would have to verify that this bug reproduces with their own Bash running in their own MinTTY). Maybe you can help out and install Cygwin (https://cygwin.com) and perform that test?

Thanks, Johannes

← back to recent threads