diff options
author | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-02-20 18:37:07 +0100 |
---|---|---|
committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-02-20 18:42:05 +0100 |
commit | bcb8c007f149da6d31a6c17c179f6f89ce823d2e (patch) | |
tree | b36c1c99846ec4c5930a83fea3e7afc49729c31a /include/git2/remote.h | |
parent | 555c81f3356b8166c09f887450eac008b221cdc3 (diff) | |
download | libgit2-bcb8c007f149da6d31a6c17c179f6f89ce823d2e.tar.gz |
Add git_remote_set_{fetch,push}spec()
Allow setting the fetch and push refspecs, which is useful for
creating new refspecs.
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r-- | include/git2/remote.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h index c7eb08cdf..9d677aae7 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -70,6 +70,15 @@ GIT_EXTERN(const char *) git_remote_name(git_remote *remote); GIT_EXTERN(const char *) git_remote_url(git_remote *remote); /** + * Set the remote's fetch refspec + * + * @param remote the remote + * @apram spec the new fetch refspec + * @return GIT_SUCCESS or an error value + */ +GIT_EXTERN(int) git_remote_set_fetchspec(git_remote *remote, const char *spec); + +/** * Get the fetch refspec * * @param remote the remote @@ -78,6 +87,15 @@ GIT_EXTERN(const char *) git_remote_url(git_remote *remote); GIT_EXTERN(const git_refspec *) git_remote_fetchspec(git_remote *remote); /** + * Set the remote's push refspec + * + * @param remote the remote + * @apram spec the new push refspec + * @return GIT_SUCCESS or an error value + */ +GIT_EXTERN(int) git_remote_set_pushspec(git_remote *remote, const char *spec); + +/** * Get the push refspec * * @param remote the remote |