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

[PATCH] Completion/Unix/Command/_git: remove -2 with __git_recent_commits



From: Daniel Hahler <git@xxxxxxxxxx>

This fixes duplicate entries, because __git_recent_commits gets called
twice for _git-checkout (for __git_revisions and __git_tree_ishs):

1. __git_commit_objects_prefer_recent _alternative __git_commits
   __git_revisions _alternative _git-checkout
2. __git_commit_objects_prefer_recent _alternative __git_commits
   __git_tree_ishs _alternative _git-checkout
---
 Completion/Unix/Command/_git | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 18d8954..a0ec343 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5713,7 +5713,7 @@ __git_recent_commits () {
   expl=()
   _wanted heads expl 'head' compadd "$@" -a - heads && ret=0
   expl=()
-  _describe -2Vx -t commits 'recent commit object name' descr && ret=0
+  _describe -Vx -t commits 'recent commit object name' descr && ret=0
   return $ret
 }
 
-- 
2.4.0.dirty



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