about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2007-07-12 06:34:20 +0000
committerClint Adams <clint@users.sourceforge.net>2007-07-12 06:34:20 +0000
commita1374319dcdd81c66aae6bc8cc0adc0889943cd1 (patch)
tree3ff51255390189b025963b396ab303da133e82a0
parent01ba47bd4fc59c66b98301186cac7bc64c89404a (diff)
downloadzsh-a1374319dcdd81c66aae6bc8cc0adc0889943cd1.tar.gz
zsh-a1374319dcdd81c66aae6bc8cc0adc0889943cd1.tar.xz
zsh-a1374319dcdd81c66aae6bc8cc0adc0889943cd1.zip
23674: merge in git clone completion fixes from Nikolai Weibull's repository.
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_git11
2 files changed, 13 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index eb67ec1cb..889468f9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-07-12  Clint Adams  <clint@zsh.org>
+
+	* 23674: Completion/Unix/Command/_git: merge in git clone
+	completion fixes from Nikolai Weibull's repository.
+
 2007-07-06  Clint Adams  <clint@zsh.org>
 
 	* 23666: Completion/Debian/Type/_deb_packages:
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 56d7bfa2f..3c10e0b1b 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -902,18 +902,23 @@ _git-cherry-pick () {
 _git-clone () {
   local -a shared
 
-  if (( $words[(I)(-l|--local)] )); then
+  if (( words[(I)(-l|--local)] )); then
     shared=('(-s --shared)'{-s,--shared}'[share the objects with the source repository]')
   fi
 
   _arguments \
+    '--bare[make a bare GIT repository]' \
     '(-l --local)'{-l,--local}'[perform a local cloning of a repository]' \
-    $shared
+    $shared \
+    '--reference[reference repository]:repository:_directories' \
     '(-q --quiet)'{-q,--quiet}'[operate quietly]' \
     '-n[do not checkout HEAD after clone is complete]' \
+    '(-o --origin)'{-o,--origin}'[use given name instead of "origin" as branch name]:name:__git_guard_branch-name' \
     '(-u --upload-pack)'{-u,--uploadpack}'[specify path to git-upload-pack on remote side]:remote path' \
+    $template_arg \
+    '--depth[create a shallow clone, given number of revisions deep]: :_guard "[[\:digit\:]]##" depth' \
     ':repository:__git_any_repositories' \
-    ':directory:_directories' && ret=0
+    '*:directory:_directories' && ret=0
 }
 
 _git-commit () {