summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2008-08-19 01:07:25 +0000
committerClint Adams <clint@users.sourceforge.net>2008-08-19 01:07:25 +0000
commit123ebafbba738164e8b0894c97dae4e0eaae4a46 (patch)
treec1b94e2e0398833f8a7a13ab24ffbb46c315e47f
parenta5c5174c00a26850e710565cd792522f064b59a8 (diff)
downloadzsh-123ebafbba738164e8b0894c97dae4e0eaae4a46.tar.gz
zsh-123ebafbba738164e8b0894c97dae4e0eaae4a46.zip
25486: patch to allow --shared to be completed without --local with git clone.
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_git10
2 files changed, 6 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 4cf84a81c..8efbc1195 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2008-08-19 Clint Adams <clint@zsh.org>
+ * 25486: Completion/Unix/Command/_git: patch to allow --shared to
+ be completed without --local with git clone.
+
* 25485: Completion/Unix/Command/_git: patch to allow --abbrev to
be completed before -v with git branch, from Mikael Magnusson.
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 860cc940b..496195bbf 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1590,20 +1590,16 @@ _git-clean () {
# TODO: The --no-checkout is undocumented.
(( $+functions[_git-clone] )) ||
_git-clone () {
- local -a shared
-
- 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 \
+ '(-s --shared)'{-s,--shared}'[share the objects with the source repository (warning: see man page)]'
'--reference[reference repository]:repository:_directories' \
'(-q --quiet)'{-q,--quiet}'[operate quietly]' \
- '-n[do not checkout HEAD after clone is complete]' \
+ '(-n --no-checkout)'{-n,--no-checkout}'[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' \
+ '--no-hardlinks[copy files instead of hardlinking when doing a local clone]' \
$upload_pack_arg \
$template_arg \
'--depth[create a shallow clone, given number of revisions deep]: :_guard "[[\:digit\:]]##" depth' \