* [PATCH] _git-checkout: do not call __git_commits twice
@ 2015-05-19 8:03 Daniel Hahler
0 siblings, 0 replies; only message in thread
From: Daniel Hahler @ 2015-05-19 8:03 UTC (permalink / raw)
To: zsh-workers
From: Daniel Hahler <git@thequod.de>
This makes branch_arg empty by default, to be used only for
__git_remote_branch_names.
'branches::__git_revisions' was used here, but that's the same as
tree_ish_arg='tree-ishs::__git_tree_ishs' - both call __git_commits.
Only tree_ish_arg will call __git-commits now.
---
Completion/Unix/Command/_git | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index fb9cae1..b67e2bf 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -456,14 +456,13 @@ _git-checkout () {
[[ $line[CURRENT] = -* ]] && return
if (( CURRENT == 1 )) && [[ -z $opt_args[(I)--] ]]; then
# TODO: Allow A...B
- local branch_arg='branches::__git_revisions' \
+ local branch_arg='' \
remote_branch_noprefix_arg='remote branches::__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=
- tree_ish_arg=
file_arg=
elif [[ -n $opt_args[(I)--track] ]]; then
branch_arg='remote-branches::__git_remote_branch_names'
@@ -471,7 +470,6 @@ _git-checkout () {
tree_ish_arg=
file_arg=
elif [[ -n ${opt_args[(I)--ours|--theirs|-m|--conflict|--patch]} ]]; then
- branch_arg=
remote_branch_noprefix_arg=
fi
--
2.4.0.dirty
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-05-19 8:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-19 8:03 [PATCH] _git-checkout: do not call __git_commits twice Daniel Hahler
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).