summaryrefslogtreecommitdiff
path: root/include/git2/remote.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-08-22 15:43:57 +0200
committerVicent Marti <tanoku@gmail.com>2011-08-30 19:37:14 +0200
commit778e1c739b1c9e06d5b3e3d5c965f4a63d40881f (patch)
treeb8912267df7d6957e67660416e2526882b2f7563 /include/git2/remote.h
parentb5a8aa94bf144d77a922074c7dad38afcf0a6d24 (diff)
downloadlibgit2-778e1c739b1c9e06d5b3e3d5c965f4a63d40881f.tar.gz
Add git_remote_new
As we no longer expose the transport functions, this is now the only way to connect to a remote when given an URL instead of a remote name Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r--include/git2/remote.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index a634b49c2..651e41075 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -46,6 +46,18 @@ GIT_BEGIN_DECL
*/
/**
+ * Create a new unnamed remote
+ *
+ * Useful when you don't want to store the remote
+ *
+ * @param out pointer to the new remote object
+ * @param repo the associtated repository
+ * @param url the remote repository's URL
+ * @return GIT_SUCCESS or an error message
+ */
+int git_remote_new(git_remote **out, git_repository *repo, const char *url);
+
+/**
* Get the information for a particular remote
*
* @param out pointer to the new remote object