summaryrefslogtreecommitdiff
path: root/include/git2/remote.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-11-18 21:28:07 +0100
committerCarlos Martín Nieto <carlos@cmartin.tk>2011-11-18 21:39:34 +0100
commit617bfdf47fbe307070dcd084a4e3ea410823c88c (patch)
tree1d6e64a6a4201eac53eac285464d13e3283881b6 /include/git2/remote.h
parent95057b85034a226ed5f9bcd7a461a296bbdb7bd9 (diff)
downloadlibgit2-617bfdf47fbe307070dcd084a4e3ea410823c88c.tar.gz
Add a name to a remote created from the API
Make it a bit more resilient. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r--include/git2/remote.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 0781bb773..15d0aa3c0 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -28,16 +28,18 @@ GIT_BEGIN_DECL
*/
/**
- * Create a new unnamed remote
+ * Create a remote in memory
*
- * Useful when you don't want to store the remote
+ * Create a remote with the default refspecs in memory. You can use
+ * this when you have a URL instead of a remote's name.
*
* @param out pointer to the new remote object
* @param repo the associtated repository
* @param url the remote repository's URL
+ * @param name the remote's name
* @return GIT_SUCCESS or an error code
*/
-int git_remote_new(git_remote **out, git_repository *repo, const char *url);
+int git_remote_new(git_remote **out, git_repository *repo, const char *url, const char *name);
/**
* Get the information for a particular remote