Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] _git-checkout: do not call __git_commits twice
- X-seq: zsh-workers 35216
- From: Daniel Hahler <genml+zsh-workers@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] _git-checkout: do not call __git_commits twice
- Date: Tue, 19 May 2015 10:03:17 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thequod.de; h= x-mailer:message-id:date:date:subject:subject:from:from:received :received:received; s=postfix2; t=1432022599; bh=fLluzA+Wc4LbIpm 5oGRXqB2xM2dz3gf8gQ2J6x+RCkY=; b=mAJgBjCGclpOGJCgkeCx/wGU8todBho FgyGyWFVH7A0N3YkxlOPVsLHo6p+yRsUUJPxoz4Ud5otqX1RW7mLgEMiMEDrhWIy zQrYYTb3i/24Thi5uMV9IhoIEQ8ClO7fyMHemgpfgnEo9VmzTg7MFbr+60QIPSCc 9YJzNaeSsf4U=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
From: Daniel Hahler <git@xxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author