From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Nieder Subject: Re: [PATCH 1/2] Documentation/remote-helpers: Add invocation and see also sections Date: Mon, 29 Mar 2010 00:06:00 -0500 Message-ID: <20100329050600.GA9238@progeny.tock> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Git Mailing List , Sverre Rabbelier , Gabriel Filion , Junio C Hamano , Michael J Gruber , Daniel Barkalow , Ilari Liusvaara , Tay Ray Chuan To: Ramkumar Ramachandra X-From: git-owner@vger.kernel.org Mon Mar 29 07:06:28 2010 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nw7BD-0005E5-Kq for gcvg-git-2@lo.gmane.org; Mon, 29 Mar 2010 07:06:28 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752777Ab0C2FGI convert rfc822-to-quoted-printable (ORCPT ); Mon, 29 Mar 2010 01:06:08 -0400 Received: from mail-yw0-f198.google.com ([209.85.211.198]:38361 "EHLO mail-yw0-f198.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752669Ab0C2FGG (ORCPT ); Mon, 29 Mar 2010 01:06:06 -0400 Received: by ywh36 with SMTP id 36so3150988ywh.4 for ; Sun, 28 Mar 2010 22:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=frbEEocNXf/sxL35ZPtuxyKBZIYFE05x/wwxpInUMwA=; b=uxwVGwNZQlmW5JwslU4nPq0+A/j1Nhf5o2/pDNSLiFv3sJAnD8kY0LBkqlm/TIfPnP ITE7wHrSY1V9rATyPy0E1mLOIxSsHGVVhg5xgIBLA2W4ia7jahRBiJF6UeXfHOulXDNy XO2+eFreVpEwjd1GqIEAl1IA7yXFrGY3l935o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; b=ep9xvNOcTZr/oxzGkvhrKiZBs3esGY9FfnlUn++zdC2o/2REQKJnb1fxEX3htw3tB7 0PjTQLBtDjEHkCFvZ4jA08ouiHl8yAZPof6XI+q4XwTyAa9mHL/iylmah8atkQyBKBz7 ARp6o2Dz9xGiLPoUITubOaI2+TOC4e2JaMQRs= Received: by 10.101.146.3 with SMTP id y3mr7491051ann.133.1269839164148; Sun, 28 Mar 2010 22:06:04 -0700 (PDT) Received: from progeny.tock (c-98-212-3-231.hsd1.il.comcast.net [98.212.3.231]) by mx.google.com with ESMTPS id 22sm3651509iwn.4.2010.03.28.22.06.02 (version=SSLv3 cipher=RC4-MD5); Sun, 28 Mar 2010 22:06:03 -0700 (PDT) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Hi, I know almost nothing about the transport machinery, so please take anything I say with a grain of salt. Ramkumar Ramachandra wrote: > --- a/Documentation/git-remote-helpers.txt > +++ b/Documentation/git-remote-helpers.txt > @@ -38,6 +38,54 @@ Git comes with a "curl" family of remote helpers, = specifically > 'git-remote-ftps'. They implement the capabilities 'fetch', 'option'= , > and 'push'. >=20 > +INVOCATION > +---------- > + > +These programs can always be invoked as 'git remote-' by > +the end user. However, the following are five situations in which > +these programs are automatically invoked by git in decreasing order = of > +priority. It took a moment for me to figure out what =E2=80=9Cdecreasing order of= priority=E2=80=9D means here. Maybe it would be clearer to make the cases mutually exclusive so it is not needed. That is: These programs can be used directly as =E2=80=98git remote-= =E2=80=99 by users and third-party scripts. However, in the more usual case, they will be used transparently by the transport machinery (i.e., by commands such as git ls-remote, git send-pack, and git archive --remot= e). The =E2=80=9Cremote name=E2=80=9D and URL passed to the remote helper = depend on how the repository is specified to git. > +1. URL using :: syntax is used directly on comman= d > + line. > ++ > +The helper is invoked with :: as the first argume= nt > +and as the second argument. ::
~~~~~~~~~~~~~~~~~~~~~~ A URL of the form ::
can be used to name a repository on the git command line, with
an arbitrary string= =2E The 'git remote-' helper will be invoked with the full ::
URL as the first argument and
as the second argument. =20 > ++ > + can only contain alphanumeric characters 0-9, A-Z and a-z. > + > +2. remote..url is unset, but remote..vcs is set to > + . > ++ > +The helper is invoked with a single argument, . > + with vcs set ~~~~~~~~~~~~~~~~~~~~~~~ A remote nickname (see git-remote(1)) can be configured to use the =E2=80=98git remote-=E2=80=99 helper by setting the vcs var= iable to in the [remote ""] section of a configuration fi= le. The url variable in such a section is optional and can be set to an arbitrary string
. If the url variable is set, the helper will be invoked with as the first argument and
as the second argument. Otherwise, the helper will be invoked with a single argument, . > +4. remote..url is set to a value using the > + :// syntax. > ++ > +The helper is invoked with as the first argument and > +:// as the second argument. > ++ > + cannot be equal to any of builtin protocols 'rsync', > +'file', 'git', 'ssh', 'git+ssh' and 'ssh+git' > + with vcs unset ~~~~~~~~~~~~~~~~~~~~~~~~~ If the [remote ""] configuration does not include a vcs setting, a remote helper can be specified by a url setting with a value of the form "://". The =E2=80=98git remote-=E2=80=99 helper will be invoked wi= th the as first argument and :// as the second argument. Exception: the built-in 'rsync', 'file', 'git', 'ssh', 'git+ssh', and 'ssh+git' transports are not handled using remote helpers. > +5. URL using :// syntax is used directly on > + command line. > ++ > +The helper is invoked with two arguments, both equal to > +://. > ++ > + cannot be equal to any of builtin protocols 'rsync', > +'file', 'git', 'ssh', 'git+ssh' and 'ssh+git' > + :// ~~~~~~~~~~~~~~~~~~~~~~~~~~~ A URL of the form :// can be used to name a repository on the git command line, with an arbitrary string. If 'transport' is not one of the built-in protocols listed above, the 'git remote-' helper will be invoked with two arguments, both equal to the full :// URL. > COMMANDS > -------- >=20 > @@ -206,6 +254,10 @@ OPTIONS > must not rely on this option being set before > connect request occurs. >=20 > +SEE ALSO > +-------- > +linkgit:git-config[1] linkgit:git-remote[1], too. HTH, Jonathan