zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Hahler <genml+zsh-workers@thequod.de>
To: zsh-workers@zsh.org
Subject: [PATCH] __git_recent_commits: prefer recent commit objects
Date: Sun,  9 Apr 2017 17:23:35 +0200	[thread overview]
Message-ID: <20170409152335.20372-1-genml+zsh-workers@thequod.de> (raw)

From: Daniel Hahler <git@thequod.de>

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


             reply	other threads:[~2017-04-09 15:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-09 15:23 Daniel Hahler [this message]
2017-04-09 18:25 ` Daniel Shahaf
2017-04-09 18:47 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170409152335.20372-1-genml+zsh-workers@thequod.de \
    --to=genml+zsh-workers@thequod.de \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).