diff options
| author | Ben Straub <bs@github.com> | 2012-12-20 10:51:09 -0800 |
|---|---|---|
| committer | Ben Straub <bs@github.com> | 2012-12-20 10:52:57 -0800 |
| commit | 29f27599eab750d2b4b8935a14be8b596b7affe2 (patch) | |
| tree | 7ee49c6386cc18d59969ab5d21805ed0624f9df0 /include/git2/remote.h | |
| parent | 316bca697f16e6fc0c9ecc943e84e9af3b39812b (diff) | |
| download | libgit2-29f27599eab750d2b4b8935a14be8b596b7affe2.tar.gz | |
Rename remote creation APIs
git_remote_add -> git_remote_create
git_remote_new -> git_remote_create_inmemory
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 |
