Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Fix a typo in _git.
- X-seq: zsh-workers 25486
- From: Clint Adams <clint@xxxxxxx>
- To: zsh-workers <zsh-workers@xxxxxxxxxx>
- Subject: Re: Fix a typo in _git.
- Date: Tue, 19 Aug 2008 01:05:39 +0000
- In-reply-to: <237967ef0808181737i29029b0kb170942152ff57fd@xxxxxxxxxxxxxx>
- Mail-followup-to: zsh-workers <zsh-workers@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <237967ef0808151656j7787f169g4b3456910e05bfc2@xxxxxxxxxxxxxx> <20080817171321.GA24334@xxxxxxxx> <237967ef0808171027t4773ff36nb1cfe08942b63a5f@xxxxxxxxxxxxxx> <20080818014613.GA30193@xxxxxxxx> <237967ef0808180247l7b0ed485ob72df0a0637c57e9@xxxxxxxxxxxxxx> <237967ef0808181310kfa7128bt2e0321e77ad96d8f@xxxxxxxxxxxxxx> <20080818224510.GA12825@xxxxxxxx> <237967ef0808181709m1f6d6c5ao2311d960284f5c3f@xxxxxxxxxxxxxx> <20080819002511.GA13736@xxxxxxxx> <237967ef0808181737i29029b0kb170942152ff57fd@xxxxxxxxxxxxxx>
On Tue, Aug 19, 2008 at 02:37:34AM +0200, Mikael Magnusson wrote:
> The man page and the command are both happy with -l -s. With recent git
> versions, the -l option is always a no-op anyway... But in all honesty,
> I think I just hadn't figured out what the (I) construction did then :).
> It is still mystifying to me why _git-branch cares where on the command-line
> the -v appears.
You don't need the local -a shared anymore in that case either.
Index: Completion/Unix/Command/_git
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
retrieving revision 1.80
diff -u -r1.80 _git
--- Completion/Unix/Command/_git 19 Aug 2008 01:01:06 -0000 1.80
+++ Completion/Unix/Command/_git 19 Aug 2008 01:03:59 -0000
@@ -1590,20 +1590,16 @@
# 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' \
Messages sorted by:
Reverse Date,
Date,
Thread,
Author