diff options
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r-- | include/git2/remote.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h index 9494a8b01..7a161796f 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -142,30 +142,22 @@ GIT_EXTERN(int) git_remote_set_url(git_remote *remote, const char* url); GIT_EXTERN(int) git_remote_set_pushurl(git_remote *remote, const char* url); /** - * Set the remote's fetch refspec + * Add a fetch refspec to the remote * * @param remote the remote - * @apram spec the new fetch refspec + * @apram refspec the new fetch refspec * @return 0 or an error value */ -GIT_EXTERN(int) git_remote_set_fetchspec(git_remote *remote, const char *spec); +GIT_EXTERN(int) git_remote_add_fetchspec(git_remote *remote, const char *refspec); /** - * Get the fetch refspec + * Add a push refspec to the remote * * @param remote the remote - * @return a pointer to the fetch refspec or NULL if it doesn't exist - */ -GIT_EXTERN(const git_refspec *) git_remote_fetchspec(const git_remote *remote); - -/** - * Set the remote's push refspec - * - * @param remote the remote - * @param spec the new push refspec + * @param refspec the new push refspec * @return 0 or an error value */ -GIT_EXTERN(int) git_remote_set_pushspec(git_remote *remote, const char *spec); +GIT_EXTERN(int) git_remote_add_pushspec(git_remote *remote, const char *refspec); /** * Get the push refspec @@ -177,6 +169,15 @@ GIT_EXTERN(int) git_remote_set_pushspec(git_remote *remote, const char *spec); GIT_EXTERN(const git_refspec *) git_remote_pushspec(const git_remote *remote); /** + * Clear the refspecs + * + * Remove all configured fetch and push refspecs from the remote. + * + * @param remote the remote + */ +GIT_EXTERN(void) git_remote_clear_refspecs(git_remote *remote); + +/** * Open a connection to a remote * * The transport is selected based on the URL. The direction argument |