There was a bug where if git was not installed then gh would do its
authentication and try to configure git but would then find out that the
git executable was not in PATH.
Now gh checks to see if the git executable is in PATH before
authenticating the user. If the git executable is in PATH the
authentication continues as normal, if it is not in PATH then it prints
out an error to the console:
$ git executable not found in $PATH
Resolves: #3818
- If the local branch already exists, use `git update-ref`
- If it needs to be created, use `git branch <newbranch>`, but don't
switch to the new branch
Bonus fixes
- Enables operation while on detached HEAD
- Enables operation even when the current remote doesn't track all
branches in the remote repo (uses FETCH_HEAD instead of the
`<remote>/<branch>` syntax)
The "path" field of a GraphQL error object contains a mix of strings and
numbers and cannot be deserialized into `[]string`. Fortunately, we
don't need to rely on the "path" field and instead have the final error
message be constructed by aggregating human-readable "message" fields.
Replace the implementation that relied on symlinks with the one that
create regular files that act like symlinks: they contain a reference to
the local directory where to find the extension.
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>
The "nospace" directive instructs the shell completion logic to avoid
adding a space after completing the word. However, this feature was
broken in an older Cobra, and users still saw a space character added.
In most case we want the space because we anticipate that the user might
want to add extra arguments to the command.
This status describes a state where the head branch is mergeable and
technically not blocked per base branch requirements, but it does have
non-passing checks.
Conditions prohibiting a regular merge: BLOCKED, BEHIND, DIRTY.
Conditions triggering a regular merge even if `--auto` was set: CLEAN,
HAS_HOOKS.
Note that UNKNOWN status does not trigger either of the conditions.