summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-06-16 17:46:06 +0200
committerVicent Marti <tanoku@gmail.com>2011-06-17 22:30:29 +0200
commitb22d147986504434188218ec74f9a6531497ffe9 (patch)
tree3b1b15f85654cf26e3f34b09745a08b28658f874 /include/git2
parentb76934de6cfb920bc52c03730667fad3e0434aa4 (diff)
downloadlibgit2-b22d147986504434188218ec74f9a6531497ffe9.tar.gz
Add git_repository_config API
This function puts the global and repository configurations in one git_config object and gives it to the user. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/repository.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/git2/repository.h b/include/git2/repository.h
index 6fd763c5f..5c7903adc 100644
--- a/include/git2/repository.h
+++ b/include/git2/repository.h
@@ -265,6 +265,16 @@ GIT_EXTERN(const char *) git_repository_path(git_repository *repo, git_repositor
*/
GIT_EXTERN(int) git_repository_is_bare(git_repository *repo);
+/**
+ * Retrieve the relevant configuration for a repository
+ *
+ * Puts together the configuration from the global and local files.
+ *
+ * @param out the repository's configuration
+ * @param repo the repository for which to get the config
+ */
+GIT_EXTERN(int) git_repository_config(git_config **out, git_repository *repo);
+
/** @} */
GIT_END_DECL
#endif