Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-04-20 06:43:28 +0400
committerCarlos Martín Nieto <cmn@dwim.me>2013-04-20 19:54:13 +0400
commit4330ab26b53c0e1bf8cbb5e65704f65e3d116eba (patch)
tree14bf8d854854298bfe43b3a02c8c26f59377c988 /src/remote.h
parente5a27f039ee3ae1291fd5084707c3f9c168f10ba (diff)
remote: handle multiple refspecs
A remote can have a multitude of refspecs. Up to now our git_remote's have supported a single one for each fetch and push out of simplicity to get something working. Let the remotes and internal code know about multiple remotes and get the tests passing with them. Instead of setting a refspec, the external users can clear all and add refspecs. This should be enough for most uses, though we're still missing a querying function.
Diffstat (limited to 'src/remote.h')
-rw-r--r--src/remote.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/remote.h b/src/remote.h
index 4c1a18aa7..b1f33f0e7 100644
--- a/src/remote.h
+++ b/src/remote.h
@@ -20,8 +20,8 @@ struct git_remote {
char *url;
char *pushurl;
git_vector refs;
- struct git_refspec fetch;
- struct git_refspec push;
+ git_vector refspecs;
+ git_vector refspec_strings;
git_cred_acquire_cb cred_acquire_cb;
void *cred_acquire_payload;
git_transport *transport;
@@ -37,4 +37,7 @@ struct git_remote {
const char* git_remote__urlfordirection(struct git_remote *remote, int direction);
int git_remote__get_http_proxy(git_remote *remote, bool use_ssl, char **proxy_url);
+git_refspec *git_remote__matching_refspec(git_remote *remote, const char *refname);
+git_refspec *git_remote__matching_dst_refspec(git_remote *remote, const char *refname);
+
#endif