about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2007-09-25 17:58:50 +0000
committerClint Adams <clint@users.sourceforge.net>2007-09-25 17:58:50 +0000
commit9433977a83f67cab603922f2bfc3f65ee6e2a096 (patch)
tree3b07855836b59891f2661658b0bea1057f15e216 /Completion
parentf24ab2ef9450c98c9bc512bfbebe348b6408f604 (diff)
downloadzsh-9433977a83f67cab603922f2bfc3f65ee6e2a096.tar.gz
zsh-9433977a83f67cab603922f2bfc3f65ee6e2a096.tar.xz
zsh-9433977a83f67cab603922f2bfc3f65ee6e2a096.zip
23831: fix handling of merge strategy option.
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_git14
1 files changed, 5 insertions, 9 deletions
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 9ec2e3fe0..62b236189 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -92,10 +92,6 @@ fetch_args=(
   '-w[write commit-id into the filename under "$GIT_DIR/refs/<filename>"]:filename'
 )
 
-declare -g merge_strategy_arg
-
-merge_strategy_arg='*'{-s,--strategy=-}'[use given merge strategy]:merge strategy:__git_merge_strategies'
-
 declare -ga merge_args
 
 # TODO: Add descriptions to strategies (stupid is undocumented).
@@ -103,7 +99,7 @@ merge_args=(
   '(-n --no-summary)'{-n,--no-summary}'[do not show diffstat at the end of the merge]'
   '--no-commit[perform the merge but do not autocommit]'
   '--squash[merge, but do not make a commit]'
-  $merge_strategy_arg
+  '*'{-s,--strategy=-}'[use given merge strategy]:merge strategy:__git_merge_strategies'
 )
 
 declare -ga force_ref_arg
@@ -1666,7 +1662,7 @@ _git-ls-remote () {
 (( $+functions[_git-merge] )) ||
 _git-merge () {
   _arguments \
-    $merge_args \
+    "$merge_args[@]" \
     ':merge message' \
     '*:remote:__git_commits' && ret=0
 }
@@ -1689,7 +1685,7 @@ _git-octupus () {
 (( $+functions[_git-pull] )) ||
 _git-pull () {
   _arguments \
-    $merge_args \
+    "$merge_args[@]" \
     $common_fetch_args \
     ':repository:__git_any_repositories' \
     '*:refspec:__git_ref_specs' && ret=0
@@ -1725,7 +1721,7 @@ _git-rebase () {
       '--abort[abort current rebase]' \
       '--skip[skip the current patch]' \
       '--merge[use merging strategies to rebase]' \
-      $merge_strategy_arg \
+      '*'{-s,--strategy=-}'[use given merge strategy]:merge strategy:__git_merge_strategies' \
       $verbose_arg \
       '-C-[ensure that given lines of surrounding context match]: :_guard "[[\:digit\:]]##" "lines of context"' \
       ':upstream branch:__git_revisions' \
@@ -2310,7 +2306,7 @@ _git-svn () {
 
       if [[ $line[1] == (dcommit|rebase) ]]; then
         arguments+=(
-            $merge_strategy_arg)
+            '*'{-s,--strategy=-}'[use given merge strategy]:merge strategy:__git_merge_strategies')
       fi
 
       if [[ $line[1] == (dcommit|log|rebase) ]]; then