mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-16 12:21:18 +02:00
40493/0001: _git-checkout: No functional change.
This makes the next diff smaller.
This commit is contained in:
parent
e641d8e9c1
commit
4da5c23dce
2 changed files with 14 additions and 13 deletions
|
@ -1,3 +1,8 @@
|
|||
2017-02-07 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
||||
* 40493/0001: Completion/Unix/Command/_git: _git-checkout:
|
||||
No functional change.
|
||||
|
||||
2017-02-06 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* Jan Matejek: 40434: Completion/Unix/Command/_patchutils:
|
||||
|
|
|
@ -473,28 +473,24 @@ _git-checkout () {
|
|||
[[ $line[CURRENT] = -* ]] && return
|
||||
if (( CURRENT == 1 )) && [[ -z $opt_args[(I)--] ]]; then
|
||||
# TODO: Allow A...B
|
||||
local branch_arg='' \
|
||||
local \
|
||||
remote_branch_noprefix_arg='remote-branch-names-noprefix::__git_remote_branch_names_noprefix' \
|
||||
tree_ish_arg='tree-ishs::__git_tree_ishs' \
|
||||
file_arg='modified-files::__git_modified_files'
|
||||
|
||||
if [[ -n ${opt_args[(I)-b|-B|--orphan|--detach]} ]]; then
|
||||
remote_branch_noprefix_arg=
|
||||
file_arg=
|
||||
_alternative $tree_ish_arg && ret=0
|
||||
elif [[ -n $opt_args[(I)--track] ]]; then
|
||||
branch_arg='remote-branches::__git_remote_branch_names'
|
||||
remote_branch_noprefix_arg=
|
||||
tree_ish_arg=
|
||||
file_arg=
|
||||
_alternative remote-branches::__git_remote_branch_names && ret=0
|
||||
elif [[ -n ${opt_args[(I)--ours|--theirs|-m|--conflict|--patch]} ]]; then
|
||||
remote_branch_noprefix_arg=
|
||||
_alternative $tree_ish_arg $file_arg && ret=0
|
||||
else
|
||||
_alternative \
|
||||
$remote_branch_noprefix_arg \
|
||||
$tree_ish_arg \
|
||||
$file_arg && ret=0
|
||||
fi
|
||||
|
||||
_alternative \
|
||||
$branch_arg \
|
||||
$remote_branch_noprefix_arg \
|
||||
$tree_ish_arg \
|
||||
$file_arg && ret=0
|
||||
elif [[ -n ${opt_args[(I)-b|-B|-t|--track|--orphan|--detach]} ]]; then
|
||||
_nothing
|
||||
elif [[ -n $line[1] ]] && __git_is_treeish $line[1]; then
|
||||
|
|
Loading…
Reference in a new issue