git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Herland <johan@herland.net>
To: git@vger.kernel.org
Cc: Daniel Barkalow <barkalow@iabervon.org>,
	Junio C Hamano <gitster@pobox.com>,
	Brian Gernhardt <benji@silverinsanity.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH 5/8] Add a config option for remotes to specify a foreign vcs
Date: Mon, 10 Aug 2009 10:32:12 +0200	[thread overview]
Message-ID: <200908101032.12835.johan@herland.net> (raw)
In-Reply-To: <alpine.LNX.2.00.0908092153520.27553@iabervon.org>

On Monday 10 August 2009, Daniel Barkalow wrote:
> On Sun, 9 Aug 2009, Junio C Hamano wrote:
> > Daniel Barkalow <barkalow@iabervon.org> writes:
> > > If this is set, the url is not required, and the transport always
> > > uses a helper named "git-remote-<value>".
> > >
> > > It is a separate configuration option in order to allow a sensible
> > > configuration for foreign systems which either have no meaningful
> > > urls for repositories or which require urls that do not specify the
> > > system used by the repository at that location. However, this only
> > > affects how the name of the helper is determined, not anything about
> > > the interaction with the helper, and the contruction is such that, if
> > > the foreign scm does happen to use a co-named url method, a url with
> > > that method may be used directly.
> >
> > Personally, I do not like this.
> >
> > Why isn't it enough to define the canonical remote name git takes as
> > "<name of the helper>:<whatever string the helper understands>"?
>
> [...]
>
> The only way I've been able to come up with to support this at all
> usefully is to have a bunch of helper-specific options that specify what
> the helper needs to know about the locations you consider to be part of
> the project and an option that tells git that this remote uses the p4
> helper. I'm not sure what makes sense for other helpers, but the case I
> actually use needs something like what's in this patch.

I'm somewhat agnostic on this issue. At the moment, I follow the P4 cues,
and use a config like this:

    [remote "foo"]
        vcs = cvs
        cvsRoot = ":pserver:user@cvs.server.example.com/var/cvs/cvsroot"
        cvsModule = "bar"
        ...

But I could just as well use a config like this instead:

    [remote "foo"]
        url = "cvs::pserver:user@cvs.server.example.com/var/cvs/cvsroot#bar"
        ...

Either is fine with me, although I suspect users might find the
current/first alternative easier to parse.

> I think it makes sense for svn access to support just having a url
> option like "svn://something (svn native protocol)", or
> "svn+ssh://something (svn protocol over ssh)" or "svn+https://something
> (https access to a svn repo)", or some other similar syntax, but this is
> a poor fit for p4.
>
> In order to support this, there just needs to be a call to check whether
> "remote-<something>" is an available git command (without running it or
> giving an error), and the helper code should be used if it is. This is
> actually required so that people with workstations whose domain is
> .kernel.org and who have cloned "master:/home/linus/something.git" don't
> start getting "remote-master isn't a git command" errors (that is,
> misinterpreting ssh-format location hostnames as helper names. Johan,
> perhaps you could write that for your CVS helper?

Sorry, not following you here. Write exactly what?

- The code in the transport layer for checking if "remote-<something>"
  is an available git command?

- The code in my CVS helper for handling the ssh-format misinterpretation,
  i.e. the case where someone has a git/ssh server called "cvs"? If so,
  how should this be handled?

> I think that, ideally, helpers for foreign systems would be portable
> across multiple native systems. The svn helper could be a program
> "svn-remote-access-helper", and anything that speaks fast-import (e.g.,
> bzr or hg) would be able to use it. When installing it for git, you'd
> symlink it to git-remote-svn; if you decided to install
> "svn-remote-access-helper-ng", you'd change the symlink.

In that case, helpers must keep their metadata in a repo-independent
format. Currently that is outside the scope of my CVS helper, since I'm
leveraging git-notes for most of the CVS helper's metadata.


...Johan

-- 
Johan Herland, <johan@herland.net>
www.herland.net

  reply	other threads:[~2009-08-10  8:32 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-09 19:28 [PATCH 5/8] Add a config option for remotes to specify a foreign vcs Daniel Barkalow
2009-08-09 20:38 ` Johannes Schindelin
2009-08-10  1:15 ` Junio C Hamano
2009-08-10  4:30   ` Daniel Barkalow
2009-08-10  8:32     ` Johan Herland [this message]
2009-08-10 19:30       ` Daniel Barkalow
2009-08-11 10:10         ` [RFC/PATCH 0/6] Graceful handling of missing remote helpers Johan Herland
2009-08-11 10:10         ` [RFC/PATCH 1/6] Minor unrelated fixes Johan Herland
2009-08-11 10:10         ` [RFC/PATCH 2/6] transport_get(): Don't SEGFAULT on missing url Johan Herland
2009-08-12 22:24           ` Junio C Hamano
2009-08-12 23:39             ` Johan Herland
2009-08-11 10:10         ` [RFC/PATCH 3/6] Move setup of curl remote helper from transport.c to transport-helper.c Johan Herland
2009-08-11 12:23           ` Johannes Schindelin
2009-08-11 10:10         ` [RFC/PATCH 4/6] Add is_git_command_or_alias() for checking availability of a given git command Johan Herland
2009-08-11 12:21           ` Johannes Schindelin
2009-08-11 10:10         ` [RFC/PATCH 5/6] Let transport_helper_init() decide if a remote helper program can be used Johan Herland
2009-08-11 12:21           ` Johannes Schindelin
2009-08-11 23:28           ` Daniel Barkalow
2009-08-12  7:46             ` Jeff King
2009-08-12 16:21               ` Daniel Barkalow
2009-08-11 10:10         ` [RFC/PATCH 6/6] Add testcase to verify handling of missing remote helper programs Johan Herland
2009-08-11  5:12       ` [PATCH 5/8] Add a config option for remotes to specify a foreign vcs Junio C Hamano
2009-08-11  8:39         ` Johannes Schindelin
2009-08-10  8:47     ` Junio C Hamano
2009-08-11 15:31   ` Bert Wesarg
2009-08-11 16:20     ` Johannes Schindelin
2009-08-11 21:48       ` Jeff King
     [not found]         ` <20090812075914.6117@nanako3.lavabit.com>
2009-08-11 23:02           ` Jeff King
2009-08-12  0:14             ` Johannes Schindelin
2009-08-12  3:26               ` Junio C Hamano
2009-08-11 23:53         ` Johannes Schindelin
2009-08-12  7:45           ` Jeff King
2009-08-12  9:33             ` Jakub Narebski
2009-08-12 20:30               ` Junio C Hamano
2009-08-13 22:00                 ` Jakub Narebski

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=200908101032.12835.johan@herland.net \
    --to=johan@herland.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=barkalow@iabervon.org \
    --cc=benji@silverinsanity.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).