summaryrefslogtreecommitdiff
path: root/include/git2/remote.h
diff options
context:
space:
mode:
authorSascha Cunz <Sascha@BabbelBox.org>2012-07-25 01:33:15 +0200
committerSascha Cunz <Sascha@BabbelBox.org>2012-07-26 23:08:22 +0200
commit765015902ab346f4879acceaf8c8adf61f0e0ed5 (patch)
tree67d101e2f2cd3b66ccac411ad2d83cff3c6522b8 /include/git2/remote.h
parent3ed4b5012bbdba844ae1ffdff884a1eb630e9884 (diff)
downloadlibgit2-765015902ab346f4879acceaf8c8adf61f0e0ed5.tar.gz
Remotes: Setter for url+pushurl; Getter for pushurl
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r--include/git2/remote.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 5c01949d2..6d4b6cc20 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -80,6 +80,36 @@ GIT_EXTERN(const char *) git_remote_name(git_remote *remote);
GIT_EXTERN(const char *) git_remote_url(git_remote *remote);
/**
+ * Get the remote's url for pushing
+ *
+ * @param remote the remote
+ * @return a pointer to the url or NULL if no special url for pushing is set
+ */
+GIT_EXTERN(const char *) git_remote_pushurl(git_remote *remote);
+
+/**
+ * Set the remote's url
+ *
+ * Existing connections will not be updated.
+ *
+ * @param remote the remote
+ * @param url the url to set
+ * @return 0 or an error value
+ */
+GIT_EXTERN(int) git_remote_set_url(git_remote *remote, const char* url);
+
+/**
+ * Set the remote's url for pushing
+ *
+ * Existing connections will not be updated.
+ *
+ * @param remote the remote
+ * @param url the url to set or NULL to clear the pushurl
+ * @return 0 or an error value
+ */
+GIT_EXTERN(int) git_remote_set_pushurl(git_remote *remote, const char* url);
+
+/**
* Set the remote's fetch refspec
*
* @param remote the remote