git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/5] Add option for using a foreign VCS
Date: Tue, 24 Mar 2009 23:49:38 -0700	[thread overview]
Message-ID: <7v1vsm9jwd.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LNX.1.00.0903242303330.19665@iabervon.org> (Daniel Barkalow's message of "Tue, 24 Mar 2009 23:04:12 -0400 (EDT)")

Daniel Barkalow <barkalow@iabervon.org> 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 <barkalow@iabervon.org>
> ---
>  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.<name>.tagopt::
>  	Setting this value to \--no-tags disables automatic tag following when
>  	fetching from remote <name>
>  
> +remote.<name>.vcs::
> +	Setting this to a value <vcs> will cause git to interact with
> +	the remote with the git-vcs-<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

  reply	other threads:[~2009-03-25  6:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-25  3:04 [PATCH 3/5] Add option for using a foreign VCS Daniel Barkalow
2009-03-25  6:49 ` Junio C Hamano [this message]
2009-03-25 16:20   ` Daniel Barkalow
2009-03-25 18:03     ` Junio C Hamano
2009-03-25 18:46       ` Daniel Barkalow
2009-03-25 18:58         ` 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=7v1vsm9jwd.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=barkalow@iabervon.org \
    --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).