-
Notifications
You must be signed in to change notification settings - Fork 145
contrib/completion: use __git() in bash completor to avoid aliased tools #282
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
base: master
Are you sure you want to change the base?
Conversation
For users who alias git to other tools that wrap git (like lab or hub) the existing completion script will use these aliased tools. Since `__git` exists and is unlikely to be aliased, making it well suited to ensure the completion script is actually calling git and not an aliased tool. Signed-off-by: Zaq? Wiedmann <[email protected]>
Welcome to GitGitGadgetHi @zaquestion, and welcome to GitGitGadget, the GitHub App to send patch series to the Git mailing list from GitHub Pull Requests. Please make sure that this Pull Request has a good description, as it will be used as cover letter. Also, it is a good idea to review the commit messages one last time, as the Git project expects them in a quite specific form:
It is in general a good idea to await the automated test ("Checks") in this Pull Request before contributing the patches, e.g. to avoid trivial issues such as unportable code. Contributing the patchesBefore you can contribute the patches, your GitHub username needs to be added to the list of permitted users. Any already-permitted user can do that, by adding a PR comment of the form Once on the list of permitted usernames, you can contribute the patches to the Git mailing list by adding a PR comment After you submit, GitGitGadget will respond with another comment that contains the link to the cover letter mail in the Git mailing list archive. Please make sure to monitor the discussion in that thread and to address comments and suggestions. If you do not want to subscribe to the Git mailing list just to be able to respond to a mail, you can download the mbox ("raw") file corresponding to the mail you want to reply to from the Git mailing list. If you use GMail, you can upload that raw mbox file via: curl -g --user "<EMailAddress>:<Password>" --url "imaps://imap.gmail.com/INBOX" -T /path/to/raw.txt |
This seems to break t9902: https://dev.azure.com/gitgitgadget/git/_build/results?buildId=11994&view=ms.vss-test-web.build-test-results-tab For example:
Any idea what is going on? Does this happen on your machine, too? |
/allow zaquestion |
User zaquestion is now allowed to use GitGitGadget. |
Weird, on my machine (linux) autocomplete works correctly for the cases shown in the tests. I'll dig a little deeper into what the root cause might be. |
Oh interesting, something between the version of the completion script that these changes were originally based off of ( whats in https://github.com/git/git/pull/536/files ) and the latest version of the script with this changes (this PR) breaks the completion in this case. Originally tested with the old PR, but was able to reproduce after I sourced this one. Should be easy enough to track down, hopefully can get that up soon. |
@zaquestion gentle ping? |
Haven't forgotten about this, admittedly also haven't had a ton of time to really dive in, but I did a few time and have had some trouble identifying what could be causing the break. Hoping to take a closer look in the next few week now that my schedule is starting to have a bit more room (finally consistently have a day off each week 🎉 ) |
For users who alias git to other tools that wrap git (like lab or hub)
the existing completion script will use these aliased tools. Since
__git
exists and is unlikely to be aliased, making it well suited toensure the completion script is actually calling git and not an aliased
tool.