From: Junio C Hamano <gitster@pobox.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: git@vger.kernel.org, Brian Gernhardt <benji@silverinsanity.com>
Subject: Re: [PATCH 5/8] Add a config option for remotes to specify a foreign vcs
Date: Sun, 09 Aug 2009 18:15:10 -0700 [thread overview]
Message-ID: <7v1vnk79lt.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: alpine.LNX.2.00.0908091526060.27553@iabervon.org
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>"?
Then <whatever string the helper understands> part does not have to
resemble URL at all, if the foreign system does not have such a concept
(i.e. "have no meaning urls for repositories").
Your "let's eject curl based transport out of core" helper (already in
'next') will become something like these in the canonical form:
curl:http://git.kernel.org/pub/scm/git/git.git
curl:ftp://git.kernel.org/pub/scm/git/git.git
curl:https://git.kernel.org/pub/scm/git/git.git
that are handled by a single helper binary git-remote-curl, but nobody has
to use these canonical forms for well-known transports, because we can
have an obvious set of backward-compatible synonyms that are understood by
the transport layer to choose that helper program, so that usual
http://git.kernel.org/pub/scm/git/git.git
will be understood to choose git-remote-curl backend. We do not need to
have three git-remote-{http,https,ftp} helpers at all.
That way, a Subversion repository people may want to interact with would
be spelled, if the helper is "git-remote-svn", like this:
svn:https://scummvm.svn.sourceforge.net/svnroot/scummvm/
and it would be crystal clear that it is not a git native repository that
is accessed over curl based walkers, and also the folks who still have not
migrated to git can simply drop the leading "svn:" and learn the name of
the repository they could access natively with Subversion. Nobody on the
Subversion side would think svn:https://... is the URL to use with
Subversion (after all they will see that on the communication in the git
circle).
And from the git side, we can tell users: "if you want to interact with
Subversion repositories, you can use traditional git-svn, or you can use
the unified remote mechanism. To use the latter, just prefix 'svn:' in
front of the URL used to refer to the repository in the Subversion world".
If you spell the "URL" as https://scummvm.svn.sourceforge.net/svnroot/scummvm/
then you wouldn't be able to give that directly to git from the command
line, without using this new configuration. I do not quite understand why
this indirection is desired. I think it only confuses users.
I recall somebody earlier mentioned a possibility to have more than one
helper that deals with one type of foreign system. In such a case, a pair
of URL and vcs configuration can be used to identify what helper to use on
what foreign "repository":
(https://scummvm.svn.sourceforge.net/svnroot/scummvm/, svn)
(https://scummvm.svn.sourceforge.net/svnroot/scummvm/, svn-ng)
and it might become easier to switch the helper without changing the URL
part. But I do not particularly think that would be a practical
advantage, unless we can assume that the next-generation version of the
helper can somehow reuse the metadata the old version of the helper left
in the repository and incrementally operate on the repository. Even in
that case, I think spelling everything out in a single configuration
(i.e.. remote.$name.url) would make it clearer to see what is going on.
next prev parent reply other threads:[~2009-08-10 1:15 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 [this message]
2009-08-10 4:30 ` Daniel Barkalow
2009-08-10 8:32 ` Johan Herland
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=7v1vnk79lt.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=barkalow@iabervon.org \
--cc=benji@silverinsanity.com \
--cc=git@vger.kernel.org \
/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).