Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: git 2.19 completion update



Oliver Kiddle wrote on Wed, Oct 17, 2018 at 01:00:26 +0200:
> +++ b/Completion/Unix/Command/_git
> @@ -295,7 +295,7 @@ _git-branch () {
>    declare l c m d e
>  
>    l='--color --no-color -r --remotes -a -v --verbose --abbrev --no-abbrev --list --points-at --sort'
> -  c='-l --create-reflog -f --force -t --track --no-track -u --set-upstream --set-upstream-to --unset-upstream --contains --no-contains --merged --no-merged'
> +  c='--create-reflog -f --force -t --track --no-track -u --set-upstream --set-upstream-to --unset-upstream --contains --no-contains --merged --no-merged'
>    m='-c --copy -C -m --move -M --edit-description'
>    d='-d --delete -D'
>  
> @@ -337,7 +337,7 @@ _git-branch () {
>      "($c $m $d : -v -vv --verbose)"{-v,-vv,--verbose}'[show SHA1 and commit subject line for each head]' \
>      "($c $m $d :)--abbrev=[set minimum SHA1 display-length]: :__git_guard_number length" \
>      "($c $m $d :)--no-abbrev[don't abbreviate sha1s]" \
> -    "($l $m $d)"{-l,--create-reflog}"[create the branch's reflog]" \
> +    "($l $m $d)--create-reflog[create the branch's reflog]" \
>      "($l $m $d -f --force)"{-f,--force}'[force the creation of a new branch]' \
>      "($l $m $d -t --track)"{-t,--track}'[setup configuration so that pull merges from the start point]' \
>      "($l $m $d)--no-track[override the branch.autosetupmerge configuration variable]" \

Not related to the patch, but _git-branch considers --remotes and --contains
to be mutually exclusive, though they aren't: «git branch -r --contains=HEAD»
works.

I'd have fixed it, but I didn't quite understand the logic behind these
one-letter variables.

Cheers,

Daniel



Messages sorted by: Reverse Date, Date, Thread, Author