zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Cc: Mateusz Karbowy <mateusz.karbowy@gmail.com>
Subject: [PATCH] _git-merge: Exclude ancestors of HEAD from recent commit completion
Date: Sat, 31 Oct 2015 12:52:46 +0000	[thread overview]
Message-ID: <20151031125246.GA3138@tarsus.local2> (raw)

As done for _git-cherry-pick in a428c6b62cb2 (36328 + 36340).

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index ad1037e..110f154 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1131,6 +1131,7 @@ _git-log () {
 _git-merge () {
   local -a merge_options
   __git_setup_merge_options
+  local -a git_commit_opts=(--all --not HEAD --not)
 
   _arguments -w -S -s \
     $merge_options \
@@ -1138,7 +1139,7 @@ _git-merge () {
     '(                    --no-rerere-autoupdate)--rerere-autoupdate[allow the rerere mechanism to update the index]' \
     '(--rerere-autoupdate                       )--no-rerere-autoupdate[do not allow the rerere mechanism to update the index]' \
     '--abort[restore the original branch and abort the merge operation]' \
-    '*: :__git_commits'
+    '*: : __git_commits -O expl:git_commit_opts'
 }
 
 (( $+functions[_git-mv] )) ||


                 reply	other threads:[~2015-10-31 13:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20151031125246.GA3138@tarsus.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=mateusz.karbowy@gmail.com \
    --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).