diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-05-28 16:09:17 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-05-28 16:09:17 +0200 |
commit | 2b92283221114843c36e4e6372b5b793b2d5ffff (patch) | |
tree | 217519a5b37c9ac01223875cbbc2ed5132b9f3cb /include/git2/remote.h | |
parent | c7f94123569e8fe00ffb3a35e6a12b6ebe9320ec (diff) | |
parent | 9566ce430fde97d5e610bb2796d27d47e1e81ab5 (diff) | |
download | libgit2-2b92283221114843c36e4e6372b5b793b2d5ffff.tar.gz |
Merge pull request #3127 from libgit2/cmn/remote-fixups
Tackle remote API issues from bindings
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r-- | include/git2/remote.h | 38 |
1 files changed, 6 insertions, 32 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h index 5c43136ac..02d73a0e6 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -63,24 +63,18 @@ GIT_EXTERN(int) git_remote_create_with_fetchspec( /** * Create an anonymous remote * - * Create a remote with the given url and refspec in memory. You can use - * this when you have a URL instead of a remote's name. Note that anonymous - * remotes cannot be converted to persisted remotes. + * Create a remote with the given url 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. - * See `git_tag_create()` for rules about valid names. - * - * @param out pointer to the new remote object + * @param out pointer to the new remote objects * @param repo the associated repository * @param url the remote repository's URL - * @param fetch the fetch refspec to use for this remote. * @return 0 or an error code */ GIT_EXTERN(int) git_remote_create_anonymous( git_remote **out, git_repository *repo, - const char *url, - const char *fetch); + const char *url); /** * Get the information for a particular remote @@ -174,7 +168,7 @@ GIT_EXTERN(int) git_remote_set_pushurl(git_repository *repo, const char *remote, * @param repo the repository in which to change the configuration * @param remote the name of the remote to change * @param refspec the new fetch refspec - * @return 0 or an error value + * @return 0, GIT_EINVALIDSPEC if refspec is invalid or an error value */ GIT_EXTERN(int) git_remote_add_fetch(git_repository *repo, const char *remote, const char *refspec); @@ -190,16 +184,6 @@ GIT_EXTERN(int) git_remote_add_fetch(git_repository *repo, const char *remote, c GIT_EXTERN(int) git_remote_get_fetch_refspecs(git_strarray *array, const git_remote *remote); /** - * Set the remote's list of fetch refspecs - * - * The contents of the string array are copied. - * - * @param remote the remote to modify - * @param array the new list of fetch resfpecs - */ -GIT_EXTERN(int) git_remote_set_fetch_refspecs(git_remote *remote, git_strarray *array); - -/** * Add a push refspec to the remote's configuration * * Add the given refspec to the push list in the configuration. No @@ -208,7 +192,7 @@ GIT_EXTERN(int) git_remote_set_fetch_refspecs(git_remote *remote, git_strarray * * @param repo the repository in which to change the configuration * @param remote the name of the remote to change * @param refspec the new push refspec - * @return 0 or an error value + * @return 0, GIT_EINVALIDSPEC if refspec is invalid or an error value */ GIT_EXTERN(int) git_remote_add_push(git_repository *repo, const char *remote, const char *refspec); @@ -224,16 +208,6 @@ GIT_EXTERN(int) git_remote_add_push(git_repository *repo, const char *remote, co GIT_EXTERN(int) git_remote_get_push_refspecs(git_strarray *array, const git_remote *remote); /** - * Set the remote's list of push refspecs - * - * The contents of the string array are copied. - * - * @param remote the remote to modify - * @param array the new list of push resfpecs - */ -GIT_EXTERN(int) git_remote_set_push_refspecs(git_remote *remote, git_strarray *array); - -/** * Get the number of refspecs for a remote * * @param remote the remote |