-
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
Git Bash 2.24 hard breaking change: Git Bash windows command agument no more work and unwanted escaping. #2442
Comments
For information I just downgraded to |
Hmm. This was supposed to work only with
|
Thanks for your fast return on this. I was aware of this flags. To be more precise, before 2.24:
Before 2.24, calling commands with ".exe" was a good way to work because using .exe commands are pure windows so they must not have this automatic path conversion (many windows commands use the slash as parameter option). In any case, the code handling this should be reviewed to know why it has changed... and choose if we must come back to this new behavious or the old one. I use the following versions for my test: Thanks. |
Could you try again, but this time with the portable versions so that you can copy individual files from the latter to the former until it breaks, to pinpoint what component introduced the change? My hunch is that copying |
I just tried and like you guess it I confirm you are right. Changing the dll So the changes has been introduced in the 2.23: https://github.com/git-for-windows/git/releases/download/v2.23.0.windows.1/PortableGit-2.23.0-64-bit.7z.exe |
The difference can be seen in https://github.com/git-for-windows/build-extra/blob/master/versions/package-versions-2.23.0.txt#L107 vs https://github.com/git-for-windows/build-extra/blob/master/versions/package-versions-2.24.1.2.txt#L107: 3.0.7-3 vs 3.0.7-4 Looking at the commit history at https://github.com/git-for-windows/MSYS2-packages/commits/master/msys2-runtime, it seems that the difference between those two versions is contained completely within git-for-windows/MSYS2-packages@0bb0ec9#diff-8403b7464bfa043c51ef402beb7ac79b. I cannot actually spot anything that would be responsible for the described behavior. |
Thanks for investiging it. There must be necessary a change somewhere, as the bug I mention is easily reproductible by just using the two git portable version on Windows. Thanks. |
This change works with Git for Windows 2.24.1.2 and backwards compatibility test with 2.22.0 was also successful. git-for-windows/git#2442 Signed-off-by: Jeremiah Snapp <jeremiah@chef.io>
Closing stale ticket. |
Hello,
A pretty hard bug is making many problems with some .sh script runned with Git Bash (Git-2.24.1.2-64-bit.exe).
If you try to run on 2.24:
cmd.exe /C dir
, it will open the CMD prompt without executing the command... !Before it worked ok.
It works with
cmd.exe //C dir
, but runned command are auto-escaped where it is not needed.Running:
cmd.exe //C 'ftype sh_auto_file="C:\Program Files\Git\git-bash.exe" "%1"'
return
sh_auto_file=\"C:\Program Files\Git\git-bash.exe\" \"%1\"
(and so the file association don't work by the way...)As for consequence a simple check in one of our .sh script no more works:
This is just an exemple, but this is really a problem for bash script calling windows utilities.
For now we will patch those call by proxifing them to powershell:
powershell.exe -Command 'cmd.exe /C ....'
, it works ok.But it is a real breaking change here made in Git Bash.
Is it a bug or wanted ? It is documented somewhere ?
Thanks a lot.
The text was updated successfully, but these errors were encountered: