diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-04-22 04:38:08 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-05-13 09:46:36 +0200 |
commit | 22261344de18b3cc60ee6937468d66a6a6a28875 (patch) | |
tree | 6b12365545f66fb0ea274bf034049da3bb397176 /include | |
parent | 8f0104ecc54db00a075310ab744a19eb60e3d740 (diff) | |
download | libgit2-22261344de18b3cc60ee6937468d66a6a6a28875.tar.gz |
remote: remove url and pushurl from the save logic
As a first step in removing the repository-saving logic, don't allow
chaning the url or push url from a remote object, but change the
configuration on the configuration immediately.
Diffstat (limited to 'include')
-rw-r--r-- | include/git2/remote.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h index 5aea777c1..19b2fdf13 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -153,26 +153,30 @@ GIT_EXTERN(const char *) git_remote_url(const git_remote *remote); GIT_EXTERN(const char *) git_remote_pushurl(const git_remote *remote); /** - * Set the remote's url + * Set the remote's url in the configuration * - * Existing connections will not be updated. + * Remote objects already in memory will not be affected. This assumes + * the common case of a single-url remote and will otherwise return an error. * - * @param remote the remote + * @param repo the repository in which to perform the change + * @param remote the remote's name * @param url the url to set * @return 0 or an error value */ -GIT_EXTERN(int) git_remote_set_url(git_remote *remote, const char* url); +GIT_EXTERN(int) git_remote_set_url(git_repository *repo, const char *remote, const char* url); /** - * Set the remote's url for pushing + * Set the remote's url for pushing in the configuration. * - * Existing connections will not be updated. + * Remote objects already in memory will not be affected. This assumes + * the common case of a single-url remote and will otherwise return an error. * - * @param remote the remote - * @param url the url to set or NULL to clear the pushurl - * @return 0 or an error value + * + * @param repo the repository in which to perform the change + * @param remote the remote's name + * @param url the url to set */ -GIT_EXTERN(int) git_remote_set_pushurl(git_remote *remote, const char* url); +GIT_EXTERN(int) git_remote_set_pushurl(git_repository *repo, const char *remote, const char* url); /** * Add a fetch refspec to the remote |