Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Fix a typo in _git.



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