diff options
author | Vicent Martà <vicent@github.com> | 2013-04-30 03:29:48 -0700 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2013-04-30 03:29:48 -0700 |
commit | d76fb20ebce03b2fd87c2472d556bf9b64894efd (patch) | |
tree | 53ee85c45fce967dc183264ad66ecd78215f323e /include/git2/remote.h | |
parent | 099c1b747a15d3267dc4be533f08fe8435251708 (diff) | |
parent | 9c5d4b2e807cdbb83cf55868700b0387cd4e8c41 (diff) | |
download | libgit2-d76fb20ebce03b2fd87c2472d556bf9b64894efd.tar.gz |
Merge pull request #1520 from carlosmn/nth-refspec
Add refspec list accessors
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r-- | include/git2/remote.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h index f02b95678..2aa384a54 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -191,6 +191,32 @@ GIT_EXTERN(int) git_remote_get_push_refspecs(git_strarray *array, git_remote *re GIT_EXTERN(void) git_remote_clear_refspecs(git_remote *remote); /** + * Get the number of refspecs for a remote + * + * @param remote the remote + * @return the amount of refspecs configured in this remote + */ +GIT_EXTERN(size_t) git_remote_refspec_count(git_remote *remote); + +/** + * Get a refspec from the remote + * + * @param remote the remote to query + * @param n the refspec to get + * @return the nth refspec + */ +GIT_EXTERN(const git_refspec *)git_remote_get_refspec(git_remote *remote, size_t n); + +/** + * Remove a refspec from the remote + * + * @param remote the remote to query + * @param n the refspec to remove + * @return 0 or GIT_ENOTFOUND + */ +GIT_EXTERN(int) git_remote_remove_refspec(git_remote *remote, size_t n); + +/** * Open a connection to a remote * * The transport is selected based on the URL. The direction argument |