Closed mattn closed 2 years ago
/assign @corneliusweig
Thanks for the patch. I'd love to understand this first.
To me this is very awkward because you'd think something like this would be necessary only if we were executing the git
process in a /bin/bash -c "..."
or cmd.exe /c "..."
.
but we're doing this execution through the Go os/exec package which uses CreateProcess API in Win32, that's why I am not fully getting why such escaping is necessary.
Does this syscall somehow have an arguments interpretation/evaluation step that we're not aware of? It would be good to learn why's this happening first.
msys2 shell handle @{}
in peculiar argument parser.
FYI, On Windows, arguments are parsed in the process it-self. (not a shell part like UNIX)
@mattn I still don't understand the problem and I do need to understand the problem fully so that we do not break other hundreds or thousands of Windows users who have been using Krew on Windows just fine.
So it seems in your gcc example that the args are sent to the process correctly. (I don't know why you're showing msys echo.exe here).
What matters here is whether git
is handling the @{upstream}
arg correctly and based on other Windows users I have asked, the answer for them seems to be yes, that argument works just fine. I want to understand why is your git behaving differently.
If the program is linked with msys2 or cygwin runtime, that escaping is required. AFAIK, git on Windows shound be linked those runtimes.
One another candidate for fixing is quote.
This is a part converting that @{}
.
How about to use remotes/origin/HEAD
instead of @{upstream}
?
I found a spell to fix this issue MSYS=noglob
.
How about to use
remotes/origin/HEAD
instead of@{upstream}
?
IIRC this was previously discussed and we wanted to do it this way for a reason, but I might be wrong. See the blame history, maybe that helps.
I found a spell to fix this issue
MSYS=noglob
.
That's great, although again, I am not sure if we should set this or whether it should be set by the user in their .bashrc or whatever they use. I am not sure what % of Krew users are using MSYS/Cygwin, but this little env-override (especially since it's only for windows, and only does something on cygwin/msys) might be okay...
I think this is less wrong for users for msys2 git.
/retitle Prevent windows msys shell from interpreting @{upstream} arg
for future reference, I'll drop the issue you opened 5 years ago here ;) https://github.com/msys2/MSYS2-packages/issues/522#issue-144797722
/cc @corneliusweig any concerns?
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: corneliusweig, mattn
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Sorry, I was confused and commented wrong mistaken with another PR.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/reopen
/remove-lifecycle rotten
Please send feedback to sig-contributor-experience at kubernetes/community.
/close
@k8s-triage-robot: Closed this PR.
Fixes #737