summaryrefslogtreecommitdiff
path: root/src/repository.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2015-09-24 14:37:10 +0200
committerPatrick Steinhardt <ps@pks.im>2017-02-13 10:28:15 +0100
commit4292837d502fedbbf1f24abe355eb349e4b3b0c9 (patch)
treec981feb33bdf01222b27bd039362ada74662146e /src/repository.c
parente9403024fe65528a4125ae08a89cd5a8f2eb61e2 (diff)
downloadlibgit2-4292837d502fedbbf1f24abe355eb349e4b3b0c9.tar.gz
config: open configuration in commondir
A repository's configuartion file can always be found in the GIT_COMMON_DIR, which has been newly introduced. For normal repositories this does change nothing, but for working trees this change allows to access the shared configuration file.
Diffstat (limited to 'src/repository.c')
-rw-r--r--src/repository.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/repository.c b/src/repository.c
index 1f8035aed..a829161e8 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -862,8 +862,7 @@ static int load_config(
if ((error = git_config_new(&cfg)) < 0)
return error;
- error = git_buf_joinpath(
- &config_path, repo->path_repository, GIT_CONFIG_FILENAME_INREPO);
+ error = git_repository_item_path(&config_path, repo, GIT_REPOSITORY_ITEM_CONFIG);
if (error < 0)
goto on_error;