git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Sverre Rabbelier <srabbelier@gmail.com>,
	Gabriel Filion <lelutin@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	Michael J Gruber <git@drmicha.warpmail.net>,
	Daniel Barkalow <barkalow@iabervon.org>,
	Ilari Liusvaara <ilari.liusvaara@elisanet.fi>,
	Tay Ray Chuan <rctay89@gmail.com>
Subject: Re: [PATCH 1/2] Documentation/remote-helpers: Add invocation and see also sections
Date: Mon, 29 Mar 2010 00:06:00 -0500	[thread overview]
Message-ID: <20100329050600.GA9238@progeny.tock> (raw)
In-Reply-To: <f3271551003282104v384d2dc7qe0d3c092c01bc505@mail.gmail.com>

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'.
> 
> +INVOCATION
> +----------
> +
> +These programs can always be invoked as 'git remote-<transport>' 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 “decreasing order of priority”
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 ‘git remote-<transport>’ 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 --remote).

 The “remote name” and URL passed to the remote helper depend on how
 the repository is specified to git.

> +1. URL using <transport>::<string> syntax is used directly on command
> +   line.
> ++
> +The helper is invoked with <transport>::<string> as the first argument
> +and <string> as the second argument.

 <transport>::<address>
 ~~~~~~~~~~~~~~~~~~~~~~
 A URL of the form <transport>::<address> can be used to name a
 repository on the git command line, with <address> an arbitrary string.

 The 'git remote-<transport>' helper will be invoked with the full
 <transport>::<address> URL as the first argument and <address> as the
 second argument.
 
> ++
> +<name> can only contain alphanumeric characters 0-9, A-Z and a-z.
> +
> +2. remote.<name>.url is unset, but remote.<name>.vcs is set to
> +   <transport>.
> ++
> +The helper is invoked with a single argument, <name>.
> +

 <nickname> with vcs set
 ~~~~~~~~~~~~~~~~~~~~~~~
 A remote nickname (see git-remote(1)) can be configured to use the
 ‘git remote-<transport>’ helper by setting the vcs variable to
 <transport> in the [remote "<nickname>"] section of a configuration file.
 The url variable in such a section is optional and can be set to an
 arbitrary string <address>.

 If the url variable is set, the helper will be invoked with <nickname>
 as the first argument and <address> as the second argument.
 Otherwise, the helper will be invoked with a single argument, <nickname>.

> +4. remote.<name>.url is set to a value using the
> +   <transport>://<rest-of-URL> syntax.
> ++
> +The helper is invoked with <name> as the first argument and
> +<helper>://<rest-of-URL> as the second argument.
> ++
> +<transport> cannot be equal to any of builtin protocols 'rsync',
> +'file', 'git', 'ssh', 'git+ssh' and 'ssh+git'
> +

 <nickname> with vcs unset
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 If the [remote "<nickname>"] configuration does not include a vcs
 setting, a remote helper can be specified by a url setting with a
 value of the form "<transport>://<rest-of-URL>".

 The ‘git remote-<transport>’ helper will be invoked with
 the <nickname> as first argument and <transport>://<rest-of-URL>
 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 <transport>://<rest-of-URL> syntax is used directly on
> +   command line.
> ++
> +The helper is invoked with two arguments, both equal to
> +<transport>://<rest-of-URL>.
> ++
> +<transport> cannot be equal to any of builtin protocols 'rsync',
> +'file', 'git', 'ssh', 'git+ssh' and 'ssh+git'
> +

 <transport>://<rest-of-URL>
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 A URL of the form <transport>://<rest-of-URL> can be used to name a
 repository on the git command line, with <rest-of-URL> an arbitrary
 string.

 If 'transport' is not one of the built-in protocols listed above,
 the 'git remote-<transport>' helper will be invoked with two
 arguments, both equal to the full <transport>://<rest-of-URL>
 URL.

>  COMMANDS
>  --------
> 
> @@ -206,6 +254,10 @@ OPTIONS
>  	must not rely on this option being set before
>  	connect request occurs.
> 
> +SEE ALSO
> +--------
> +linkgit:git-config[1]

linkgit:git-remote[1], too.

HTH,
Jonathan

  reply	other threads:[~2010-03-29  5:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-29  4:04 [PATCH 1/2] Documentation/remote-helpers: Add invocation and see also sections Ramkumar Ramachandra
2010-03-29  5:06 ` Jonathan Nieder [this message]
2010-03-29  6:22   ` Ramkumar Ramachandra
2010-04-05 22:07 ` Junio C Hamano
2010-04-05 22:28   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100329050600.GA9238@progeny.tock \
    --to=jrnieder@gmail.com \
    --cc=artagnon@gmail.com \
    --cc=barkalow@iabervon.org \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ilari.liusvaara@elisanet.fi \
    --cc=lelutin@gmail.com \
    --cc=rctay89@gmail.com \
    --cc=srabbelier@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).