diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/repository.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/repository.c b/src/repository.c index 705358b83..15ee67fa4 100644 --- a/src/repository.c +++ b/src/repository.c @@ -270,7 +270,6 @@ cleanup: int git_repository_config( git_config **out, git_repository *repo, - const char *user_config_path, const char *system_config_path) { char config_path[GIT_PATH_MAX]; @@ -287,10 +286,9 @@ int git_repository_config( if (error < GIT_SUCCESS) goto cleanup; - if (user_config_path != NULL) { - error = git_config_add_file_ondisk(*out, user_config_path, 2); - if (error < GIT_SUCCESS) - goto cleanup; + error = git_config_find_global(config_path); + if (error == GIT_SUCCESS) { + error = git_config_add_file_ondisk(*out, config_path, 2); } if (system_config_path != NULL) { |