diff options
author | Victor Garcia <victor@tuenti.com> | 2013-11-08 12:14:31 +0100 |
---|---|---|
committer | Victor Garcia <victor@tuenti.com> | 2013-11-08 12:14:31 +0100 |
commit | 40b99d05b4a1221768c25c889180c12d2f43be8b (patch) | |
tree | 6fbf4f41fb843571598025a1d123899b0233c873 /include/git2/remote.h | |
parent | 99feb98897fa1daa0ff3fd70b17ccc9d9a51f1d0 (diff) | |
download | libgit2-40b99d05b4a1221768c25c889180c12d2f43be8b.tar.gz |
splitting funcionality in two methods to avoid ambiguity with NULL
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r-- | include/git2/remote.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h index f5e6f5aeb..116b31e35 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -27,6 +27,22 @@ GIT_BEGIN_DECL typedef int (*git_remote_rename_problem_cb)(const char *problematic_refspec, void *payload); /** + * Add a remote with the default fetch refsspec to the repository's configuration. This + * calls git_remote_save before returning. + * + * @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 + * @return 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code + */ +GIT_EXTERN(int) git_remote_create( + git_remote **out, + git_repository *repo, + const char *name, + const char *url); + +/** * Add a remote with the provided fetch refspec (or default if NULL) to the repository's * configuration. This * calls git_remote_save before returning. @@ -38,7 +54,7 @@ typedef int (*git_remote_rename_problem_cb)(const char *problematic_refspec, voi * @param fetch the remote fetch value * @return 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code */ -GIT_EXTERN(int) git_remote_create( +GIT_EXTERN(int) git_remote_create_with_fetchspec( git_remote **out, git_repository *repo, const char *name, |