Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _git clone fix
- X-seq: zsh-workers 23674
- From: Clint Adams <clint@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: PATCH: _git clone fix
- Date: Thu, 12 Jul 2007 02:32:11 -0400
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
The missing backslash after $shared was somewhat fatal, so merging in
the rest of Nikolai's git-clone changes.
Index: Completion/Unix/Command/_git
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
retrieving revision 1.15
diff -u -r1.15 _git
--- Completion/Unix/Command/_git 5 Jul 2007 16:49:59 -0000 1.15
+++ Completion/Unix/Command/_git 12 Jul 2007 06:30:28 -0000
@@ -902,18 +902,23 @@
_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 () {
Messages sorted by:
Reverse Date,
Date,
Thread,
Author