summaryrefslogtreecommitdiff
path: root/include/git2/remote.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2012-02-26 19:15:36 +0100
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-02-26 19:15:36 +0100
commit8171998f8d90574ecf36016192b6426ed74751f6 (patch)
tree5c65164a5974f11de34b1f6eeb050ef1b3ac2bc3 /include/git2/remote.h
parent6b63589e3512cb8ad895dcac8482850c2f256f29 (diff)
downloadlibgit2-8171998f8d90574ecf36016192b6426ed74751f6.tar.gz
Add git_remote_list()
Loops through the configuration and generates a list of configured remotes.
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r--include/git2/remote.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 9339434e5..e6537ec52 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