summaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorSven Strickroth <email@cs-ware.de>2012-09-24 18:59:00 +0200
committerSven Strickroth <email@cs-ware.de>2012-09-24 18:59:00 +0200
commit8b4f9b17580c52ac2b1f2f42f5c53116fb763436 (patch)
tree1f23fd905408276cd436957e11db401f1f93ad05 /src/config.c
parent6605f51d81a9ccfb1b5a1c1689a57cf3f5b2f5b3 (diff)
downloadlibgit2-8b4f9b17580c52ac2b1f2f42f5c53116fb763436.tar.gz
Correctly read xdr compatible %HOME%/.config/git/config config file
This file is not just read if the global config file (%HOME%/.gitconfig) is not found, however, it is used everytime but with lower priority. Signed-off-by: Sven Strickroth <email@cs-ware.de>
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/config.c b/src/config.c
index e62dccf51..b3d6fc69a 100644
--- a/src/config.c
+++ b/src/config.c
@@ -451,8 +451,12 @@ int git_config_find_global_r(git_buf *path)
{
int error = git_futils_find_global_file(path, GIT_CONFIG_FILENAME);
- if (error == GIT_ENOTFOUND)
- error = git_futils_find_global_file(path, GIT_CONFIG_FILENAME_ALT);
+ return error;
+}
+
+int git_config_find_xdr_r(git_buf *path)
+{
+ int error = git_futils_find_global_file(path, GIT_CONFIG_FILENAME_ALT);
return error;
}