All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
To: Gabriel Filion <lelutin@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: RFD: git-bzr: anyone interested?
Date: Fri, 19 Feb 2010 15:55:49 +0200	[thread overview]
Message-ID: <20100219135549.GA31796@Knoppix> (raw)
In-Reply-To: <4B7E3856.3080609@gmail.com>

On Fri, Feb 19, 2010 at 02:05:58AM -0500, Gabriel Filion wrote:
> 
> The Documentation/git-remote-helpers.txt file wasn't really of much help
> .. It really only barely scratches the subject, but it does not mention
> how remote-helpers really work internally (e.g. how do they get called:
> based on protocol used in URLs?)
> 
> I'm still trying to dig up information about how to actually build, test
> and use a remote helper. I'll probably be reading code for examples.

The remote helper is invoked with one or two parameters. 

There are five cases to consider (as rule, first argument is name of
remote [pseudo-remote in case URL was used] and the second argument is
URL to use, if any):

1) Remote <remote> without URL line but with VCS line value <helper> was used.

The called program: git-remote-<helper>  [search $PATH for it].
Number of arguements: 1
1st argument: <remote>

2) Remote <remote> with URL using <helper>::<string> syntax was used.

The called program: git-remote-<helper>  [search $PATH for it].
Number of arguments: 2
1st argument: <remote>
2st argument: <string>

3) Remote <remote> with URL using <helper>://<rest-of-URL> syntax was used.

The called program: git-remote-<helper>  [serch $PATH for it].
Number of arguments: 2
1st argument: <remote>
2st argument: <helper>://<rest-of-URL>

4) URL using <helper>::<string> syntax was used directly on command line.

The called program: git-remote-<helper>  [serch $PATH for it].
Number of arguments: 2
1st argument: <helper>::<string>
2st argument: <string>

5) URL using <helper>://<rest-of-URL> syntax was used directly on command
line.

The called program: git-remote-<helper>  [serch $PATH for it].
Number of arguments: 2
1st argument: <helper>://<rest-of-URL>
2st argument: <helper>://<rest-of-URL>


Notes:

- For 2) and 4), the helper name can only contain alphanumeric characters
  0-9, A-Z and a-z.
- For 3) and 5), the helper name can't be any of builtin protocols:
  'rsync', 'file', 'git', 'ssh', 'git+ssh' nor 'ssh+git'.
- <helper>::<string> is the strongest, followed by VCS line,
  <helper>:://<rest-of-URL> is weakest.

-Ilari

  parent reply	other threads:[~2010-02-19 13:56 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-18 18:13 RFD: git-bzr: anyone interested? Gabriel Filion
2010-02-18 18:37 ` Sverre Rabbelier
2010-02-19  7:05   ` Gabriel Filion
2010-02-19  7:49     ` Sverre Rabbelier
2010-02-19 12:52       ` Gabriel
2010-02-19 13:38         ` Sverre Rabbelier
2010-02-19 15:15           ` Writing git remote helpers Gabriel
2010-02-22  4:53       ` RFD: git-bzr: anyone interested? Gabriel Filion
2010-02-19 13:55     ` Ilari Liusvaara [this message]
2010-02-22  4:42       ` Gabriel Filion
2010-02-22 10:51         ` Ilari Liusvaara
2010-02-23  3:20           ` Gabriel Filion
2010-02-23 12:45             ` Ilari Liusvaara
2010-04-26 21:41               ` Chris Packham
2010-04-26 23:46                 ` Dmitrijs Ledkovs
2010-04-27  0:58                   ` Chris Packham
2010-04-27  2:10                   ` Miles Bader
2010-04-27  2:53                 ` Gabriel Filion
2010-04-27  8:47                   ` Dmitrijs Ledkovs
2010-04-27 17:00                     ` Chris Packham
2010-04-27 17:13                   ` Chris Packham
2010-04-27 23:22                     ` Dmitrijs Ledkovs
2010-08-06  7:19                 ` Conrad Parker
2010-08-07  3:36                   ` Miles Bader
2010-08-07  8:48                     ` Gabriel Filion
2010-08-07 13:37                       ` Miles Bader
2010-08-07 13:03                   ` git-archimport (was: Re: RFD: git-bzr: anyone interested?) Jakub Narebski
2010-08-07 13:11                     ` git-archimport Matthieu Moy
2010-02-20 13:58 ` RFD: git-bzr: anyone interested? Felipe Contreras
2010-02-22  2:43   ` Gabriel Filion

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=20100219135549.GA31796@Knoppix \
    --to=ilari.liusvaara@elisanet.fi \
    --cc=git@vger.kernel.org \
    --cc=lelutin@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.