diff options
Diffstat (limited to 'include/git2/remote.h')
| -rw-r--r-- | include/git2/remote.h | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h index f3b0a9443..52404c08e 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -42,9 +42,24 @@ typedef int (*git_remote_rename_problem_cb)(const char *problematic_refspec, voi */ /** + * 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 + * @return 0 or an error code + */ +GIT_EXTERN(int) git_remote_create( + git_remote **out, + git_repository *repo, + const char *name, + const char *url); + +/** * Create a remote in memory * - * Create a remote with the default refspecs in memory. You can use + * Create a remote with the given refspec in memory. You can use * this when you have a URL instead of a remote's name. * * The name, when provided, will be checked for validity. @@ -57,7 +72,12 @@ typedef int (*git_remote_rename_problem_cb)(const char *problematic_refspec, voi * @param fetch the fetch refspec to use for this remote. May be NULL for defaults. * @return 0, GIT_EINVALIDSPEC or an error code */ -GIT_EXTERN(int) git_remote_new(git_remote **out, git_repository *repo, const char *name, const char *url, const char *fetch); +GIT_EXTERN(int) git_remote_create_inmemory( + git_remote **out, + git_repository *repo, + const char *name, + const char *url, + const char *fetch); /** * Sets the owning repository for the remote. This is only allowed on @@ -301,17 +321,6 @@ GIT_EXTERN(int) git_remote_supported_url(const char* url); GIT_EXTERN(int) git_remote_list(git_strarray *out, 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 - * @return 0 or an error code - */ -GIT_EXTERN(int) git_remote_add(git_remote **out, git_repository *repo, const char *name, const char *url); - -/** * Choose whether to check the server's certificate (applies to HTTPS only) * * @param remote the remote to configure |
