-
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-cmd.exe does not run first passed command parameter #2039
Comments
Could you confirm the two path environment strings you have in the two versions. Ensuring the right variant of the .exe files is run can be a big problem (especially given the issue of catching Ctrl-C in the different environments). I'm not an expert in that area but there have been on-going issues between the different interpretations about how to handle the different OS paradigms.... |
I can confirm. |
When we tried to make Git CMD safer recently, we inadvertently broke the use case where users would call git-cmd "<some command>" This was caused by the `doskey` command (which makes Git CMD safer) swallowing the commands. To fix this, we simply add a double ampersand to call multiple commands via a single command line (see https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/cmd#remarks for details). This fixes git-for-windows/git#2039 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The regression where `git-cmd <command>` would not execute the command [was fixed](git-for-windows/git#2039). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
A new snapshot is available that should fix this issue. Could I ask y'all to please test? |
Hi, For me it seems that the problem is not yet fixed. I hope I downloaded a correct package as it seems that the issue is still reproducible: Unfortunately I found still (an additional) problem with the parameter processing. See following picture:
If you think that this second problem is not connected to this parameter problem then I can open a new issue with it. |
Darn. I wish I was aware of that before publishing Git for Windows v2.21.0-rc0. But since I did not hear anything in 8 days, I thought we're fine.
I think this second problem is connected, but probably in a surprising way for you. When you call So now that you are still in that CMD, and now that If you now call |
We looked for exactly one space after the quoted command, but we really want to allow an arbitrary number of spaces there. This should *really* fix git-for-windows/git#2039 once and for all. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@tuspet please re-test with v2.21.0-rc2. |
@tuspet thanks for testing! |
Setup
Details
Our software runs a git-cmd command to display the actual git home directory:
This command answered with the correct path in 2.19.2 and earlier versions but returns nothing in 2.20.0.
After checking this problem deeply we found that now the 2.20.0 git-cmd.exe does not execute the first passed parameter. See the following easy command with multiple passed commands:
The expected result is:
But 2.20.0 displays only:
The text was updated successfully, but these errors were encountered: