This is to avoid hitting the filesystem and resolving symlinks
unnecessarily. The value of executable is just used conditionally by a
handful of commands.
Those hidden command are used by the shell completion scripts, but they
are not disabled auth check. Thus, the shell completion does not work
even the completion setup was done properly.
Fixes#4188
Looking at the locally-registered remotes, we have a pretty good idea
what `--repo` values are available. Let's complete them.
Helped by Nate Smith and Mislav Marohnić.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
- Extensions on Windows now enabled through the `sh.exe` interpreter
- `sh.exe` now found on Windows when git was installed via scoop
- `gh extensions list` command shows origin repo for the extension
- `gh extensions upgrade --all` is required to upgrade all extensions
- Added `gh extensions remove`
- Shell completions now include aliases and extension names
- `gh` help output now lists available extension names
- Extensions are stored to XDG_DATA_HOME
The `--json` flag accepts a list of GraphQL fields to query for and
output in JSON format. To get the list of available flags, run the
command with a blank value for `--json`. Additional `--jq` and
`--template` flags are available just like in `gh api`.
This removes sensitivity to the BROWSER environment variable in tests
and makes it easier to verify the URL that the browser was invoked with
without having to stub sub-processes.
This keeps git operations working even when PATH is modified, e.g. `brew
update` will work even though Homebrew runs the command explicitly
without `/usr/local/bin` in PATH.
Additionally, this inserts a blank value for `credential.*.helper` to
instruct git to ignore previously configured credential helpers, i.e.
those that might have been set up in system configuration files. We do
this because otherwise, git will store the credential obtained from gh
in every other credential helper in the chain, which we want to avoid.
Before:
git config --global credential.https://github.com.helper '!gh auth git-credential'
After:
git config --global credential.https://github.com.helper ''
git config --global --add credential.https://github.com.helper '!/path/to/gh auth git-credential'