From: Junio C Hamano Date: Wed, 25 Mar 2009 06:49:38 GMT Subject: Re: [PATCH 3/5] Add option for using a foreign VCS Message-ID: <7v1vsm9jwd.fsf@gitster.siamese.dyndns.org> In-Reply-To: Daniel Barkalow writes: > This simply configures the remote to use a transport that doesn't have > any methods at all and is therefore unable to do anything yet. > > Signed-off-by: Daniel Barkalow > --- > Documentation/config.txt | 4 ++++ > remote.c | 2 ++ > remote.h | 2 ++ > transport.c | 3 ++- > 4 files changed, 10 insertions(+), 1 deletions(-) > > diff --git a/Documentation/config.txt b/Documentation/config.txt > index 089569a..14b0e07 100644 > --- a/Documentation/config.txt > +++ b/Documentation/config.txt > @@ -1305,6 +1305,10 @@ remote..tagopt:: > Setting this value to \--no-tags disables automatic tag following when > fetching from remote > > +remote..vcs:: > + Setting this to a value will cause git to interact with > + the remote with the git-vcs- helper. > + Nice. > diff --git a/remote.h b/remote.h > index de3d21b..e77dc1b 100644 > --- a/remote.h > +++ b/remote.h > @@ -11,6 +11,8 @@ struct remote { > const char *name; > int origin; > > + const char *foreign_vcs; > + > const char **url; > int url_nr; > int url_alloc; What are these extra blank lines for? Isn't it pretty much part of the URL group that immediately follows it? > diff --git a/transport.c b/transport.c > index 26c578e..8a37db5 100644 > --- a/transport.c > +++ b/transport.c > @@ -939,7 +939,8 @@ struct transport *transport_get(struct remote *remote, const char *url) > ret->remote = remote; > ret->url = url; > > - if (!prefixcmp(url, "rsync:")) { > + if (remote && remote->foreign_vcs) { > + } else if (!prefixcmp(url, "rsync:")) { if (...) { ; /* empty */ } else ... > ret->get_refs_list = get_refs_via_rsync; > ret->fetch = fetch_objs_via_rsync; > ret->push = rsync_transport_push; > -- > 1.6.2.1.476.g9bf04b