From 8171998f8d90574ecf36016192b6426ed74751f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Sun, 26 Feb 2012 19:15:36 +0100 Subject: Add git_remote_list() Loops through the configuration and generates a list of configured remotes. --- include/git2/remote.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/git2/remote.h b/include/git2/remote.h index 9339434e..e6537ec5 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -197,6 +197,17 @@ GIT_EXTERN(int) git_remote_update_tips(git_remote *remote); */ GIT_EXTERN(int) git_remote_valid_url(const char *url); +/** + * Get a list of the configured remotes for a repo + * + * The string array must be freed by the user. + * + * @param remotes_list a string array with the names of the remotes + * @param repo the repository to query + * @return GIT_SUCCESS or an error code + */ +GIT_EXTERN(int) git_remote_list(git_strarray *remotes_list, git_repository *repo); + /** @} */ GIT_END_DECL #endif -- cgit v1.2.1