summaryrefslogtreecommitdiff
path: root/include/git2/remote.h
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-05-03 23:27:15 -0700
committerVicent Martí <tanoku@gmail.com>2012-05-03 23:27:15 -0700
commit5f8af1bcac3d982adf0bc37a0868e420161dc761 (patch)
treeda738a93013dcd6c92e9249385b72956b5b1a74b /include/git2/remote.h
parent3fd99be98a91416dae77d65fe593965a0723fa8c (diff)
parent8e210931ca5d57b6ca7bc16b41598faa9339bc09 (diff)
downloadlibgit2-new-error-handling.tar.gz
Merge pull request #662 from carlosmn/remotesnew-error-handling
Add git_remote_add()
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r--include/git2/remote.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 7af4148dc..41ca7dbac 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -38,11 +38,12 @@ GIT_BEGIN_DECL
*
* @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
+ * @param url the remote repository's URL
+ * @param fetch the fetch refspec to use for this remote
* @return GIT_SUCCESS or an error code
*/
-GIT_EXTERN(int) git_remote_new(git_remote **out, git_repository *repo, const char *url, const char *name);
+GIT_EXTERN(int) git_remote_new(git_remote **out, git_repository *repo, const char *name, const char *url, const char *fetch);
/**
* Get the information for a particular remote
@@ -210,6 +211,16 @@ GIT_EXTERN(int) git_remote_valid_url(const char *url);
*/
GIT_EXTERN(int) git_remote_list(git_strarray *remotes_list, git_repository *repo);
+/**
+ * Add a remote with the default fetch refspec to the repository's configuration
+ *
+ * @param out the resulting remote
+ * @param repo the repository in which to create the remote
+ * @param name the remote's name
+ * @param url the remote's url
+ */
+GIT_EXTERN(int) git_remote_add(git_remote **out, git_repository *repo, const char *name, const char *url);
+
/** @} */
GIT_END_DECL
#endif