completion: fix bugs with slashes in remote names
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 20 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | completion: add helper to escape strings for fnmatchcontrib/ t/ | +19 | 0 replies | |
| 2/3 | completion: add helper to count path componentscontrib/ t/ | +37 | 0 replies | |
| 3/3 | completion: fix bugs with slashes in remote namescontrib/ t/ | +169 | 20 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] completion: fix bugs with slashes in remote names
Previously, some calls to for-each-ref passed fixed numbers of path components to strip from refs, assuming that remote names had no slashes in them. This made completions like:
git push github/dseomn :com
Result in:
git push github/dseomn :dseomn/completion-remote-slash
With this patch, it instead results in:
git push github/dseomn :completion-remote-slash
In addition, the change to __git_dwim_remote_heads() restricts it to only list remote branches, not HEAD. I think that actually improves the completion where it's used though, since HEAD doesn't seem to be valid anyway:
$ git switch HEAD fatal: a branch is expected, got 'HEAD'
David Mandelberg (3):
completion: add helper to escape strings for fnmatch
completion: add helper to count path components
completion: fix bugs with slashes in remote names
contrib/completion/git-completion.bash | 40 ++++- t/t9902-completion.sh | 213 ++++++++++++++++++++++--- 2 files changed, 225 insertions(+), 28 deletions(-)
base-commit: cb0ae672aeabefca9704477ea8018ac94f523970
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1901%2Fdseomn%2Fcompletion-remote-slash-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1901/dseomn/completion-remote-slash-v1
Pull-Request: https://github.com/git/git/pull/1901
Signature · 1 line
gitgitgadget