diff options
| author | Vicent Martà <tanoku@gmail.com> | 2012-05-08 13:42:11 -0700 |
|---|---|---|
| committer | Vicent Martà <tanoku@gmail.com> | 2012-05-08 13:42:11 -0700 |
| commit | 1f796cd1807180bbf20d094954fd7909c6ef1ac7 (patch) | |
| tree | 76cf03ff7b162da11c22b5d8b76c671149dd299d /include | |
| parent | 19579847f6b4ee6942253f2a6311a936e4ac05ac (diff) | |
| parent | baaa8a447ed6da152038770805464485d5d7bb21 (diff) | |
| download | libgit2-1f796cd1807180bbf20d094954fd7909c6ef1ac7.tar.gz | |
Merge pull request #676 from carlosmn/remotes
Add git_remote_add() and change signature for _new()
Diffstat (limited to 'include')
| -rw-r--r-- | include/git2/remote.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h index e81e25f98..6550cd20b 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 @@ -218,6 +219,16 @@ GIT_EXTERN(int) git_remote_supported_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 |
