Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] __git_recent_commits: prefer recent commit objects
- X-seq: zsh-workers 40943
- From: Daniel Hahler <genml+zsh-workers@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] __git_recent_commits: prefer recent commit objects
- Date: Sun,  9 Apr 2017 17:23:35 +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=1491751423; bh=eD+mFRaD3X3dbko	fmweWFPU4LGkH/S7P+yb114Gjo2A=; b=eEQyPLrbKH/aqXTPFe1NKwi25mbm/Pe	jg2QvDUpO8CG5c8oGgoojSiXCKJqH2/AARqt9Jkyx+nsz1YuQ92Taftfg5UfOd52	gZoMCo747zlOsDoQ65OSXdysYLkAaaZoU9/vvIRLuA+OQtYvaJRyB5jUO4OsRNmY	mSAp38KPQq5A=
- 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>
Without this "commit to be amended" shows up before "recent commit object
name" with `git commit --fixup`, but the recent commit objects are the
most useful here.
RFC: Daniel Shahaf mentioned that `expl=()` might not be right here after all,
so I am waiting for feedback before pushing it.
---
 Completion/Unix/Command/_git | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 85aac9264..a46e3b55d 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -6326,11 +6326,11 @@ __git_recent_commits () {
   ret=1
   # Resetting expl to avoid it 'leaking' from one line to the next.
   expl=()
+  _describe -V -t commits 'recent commit object name' descr && ret=0
+  expl=()
   _wanted commit-tags expl 'commit tag' compadd "$@" -a - tags && ret=0
   expl=()
   _wanted heads expl 'head' compadd "$@" -a - heads && ret=0
-  expl=()
-  _describe -V -t commits 'recent commit object name' descr && ret=0
   return $ret
 }
 
-- 
2.12.2
Messages sorted by:
Reverse Date,
Date,
Thread,
Author