From c578f51d52fe75e71d75566c2c216af989b65e6e Mon Sep 17 00:00:00 2001 From: Daniel Barkalow Date: Wed, 18 Nov 2009 02:42:25 +0100 Subject: Add a config option for remotes to specify a foreign vcs If this is set, the url is not required, and the transport always uses a helper named "git-remote-". 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. Signed-off-by: Daniel Barkalow Signed-off-by: Sverre Rabbelier Signed-off-by: Junio C Hamano --- remote.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'remote.h') diff --git a/remote.h b/remote.h index 5db842087d..ac0ce2ff9c 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; -- cgit v1.2.3 From 72ff894308d4f6eb9f081167377857f7a3268bca Mon Sep 17 00:00:00 2001 From: Daniel Barkalow Date: Wed, 18 Nov 2009 02:42:28 +0100 Subject: Allow helper to map private ref names into normal names This allows a helper to say that, when it handles "import refs/heads/topic", the script it outputs will actually write to refs/svn/origin/branches/topic; therefore, transport-helper should read it from the latter location after git-fast-import completes. Signed-off-by: Daniel Barkalow Signed-off-by: Junio C Hamano --- remote.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'remote.h') diff --git a/remote.h b/remote.h index ac0ce2ff9c..cdc3b5b159 100644 --- a/remote.h +++ b/remote.h @@ -91,6 +91,11 @@ void ref_remove_duplicates(struct ref *ref_map); int valid_fetch_refspec(const char *refspec); struct refspec *parse_fetch_refspec(int nr_refspec, const char **refspec); +void free_refspec(int nr_refspec, struct refspec *refspec); + +char *apply_refspecs(struct refspec *refspecs, int nr_refspec, + const char *name); + int match_refs(struct ref *src, struct ref **dst, int nr_refspec, const char **refspec, int all); -- cgit v1.2.3