summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.c10
-rw-r--r--src/config.h2
-rw-r--r--src/repository.c16
3 files changed, 14 insertions, 14 deletions
diff --git a/src/config.c b/src/config.c
index d8e54751a..b89c16b1c 100644
--- a/src/config.c
+++ b/src/config.c
@@ -454,7 +454,7 @@ int git_config_find_global_r(git_buf *path)
return error;
}
-int git_config_find_xdr_r(git_buf *path)
+int git_config_find_xdg_r(git_buf *path)
{
int error = git_futils_find_global_file(path, GIT_CONFIG_FILENAME_ALT);
@@ -483,10 +483,10 @@ int git_config_find_global(char *global_config_path, size_t length)
return 0;
}
-int git_config_find_xdr(char *xdr_config_path, size_t length)
+int git_config_find_xdg(char *xdg_config_path, size_t length)
{
git_buf path = GIT_BUF_INIT;
- int ret = git_config_find_xdr_r(&path);
+ int ret = git_config_find_xdg_r(&path);
if (ret < 0) {
git_buf_free(&path);
@@ -500,7 +500,7 @@ int git_config_find_xdr(char *xdr_config_path, size_t length)
return -1;
}
- git_buf_copy_cstr(xdr_config_path, length, &path);
+ git_buf_copy_cstr(xdg_config_path, length, &path);
git_buf_free(&path);
return 0;
}
@@ -543,7 +543,7 @@ int git_config_open_default(git_config **out)
if (!error && !git_config_find_global_r(&buf))
error = git_config_add_file_ondisk(cfg, buf.ptr, 3);
- if (!error && !git_config_find_xdr_r(&buf))
+ if (!error && !git_config_find_xdg_r(&buf))
error = git_config_add_file_ondisk(cfg, buf.ptr, 2);
if (!error && !git_config_find_system_r(&buf))
diff --git a/src/config.h b/src/config.h
index 4e451a23f..471b42dad 100644
--- a/src/config.h
+++ b/src/config.h
@@ -24,7 +24,7 @@ struct git_config {
};
extern int git_config_find_global_r(git_buf *global_config_path);
-extern int git_config_find_xdr_r(git_buf *system_config_path);
+extern int git_config_find_xdg_r(git_buf *system_config_path);
extern int git_config_find_system_r(git_buf *system_config_path);
extern int git_config_parse_bool(int *out, const char *bool_string);
diff --git a/src/repository.c b/src/repository.c
index d1cf47fe5..e9c1bdf47 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -445,7 +445,7 @@ static int load_config(
git_config **out,
git_repository *repo,
const char *global_config_path,
- const char *xdr_config_path,
+ const char *xdg_config_path,
const char *system_config_path)
{
git_buf config_path = GIT_BUF_INIT;
@@ -470,8 +470,8 @@ static int load_config(
goto on_error;
}
- if (xdr_config_path != NULL) {
- if (git_config_add_file_ondisk(cfg, xdr_config_path, 2) < 0)
+ if (xdg_config_path != NULL) {
+ if (git_config_add_file_ondisk(cfg, xdg_config_path, 2) < 0)
goto on_error;
}
@@ -493,23 +493,23 @@ on_error:
int git_repository_config__weakptr(git_config **out, git_repository *repo)
{
if (repo->_config == NULL) {
- git_buf global_buf = GIT_BUF_INIT, xdr_buf = GIT_BUF_INIT, system_buf = GIT_BUF_INIT;
+ git_buf global_buf = GIT_BUF_INIT, xdg_buf = GIT_BUF_INIT, system_buf = GIT_BUF_INIT;
int res;
const char *global_config_path = NULL;
- const char *xdr_config_path = NULL;
+ const char *xdg_config_path = NULL;
const char *system_config_path = NULL;
if (git_config_find_global_r(&global_buf) == 0)
global_config_path = global_buf.ptr;
- if (git_config_find_xdr_r(&xdr_buf) == 0)
- xdr_config_path = xdr_buf.ptr;
+ if (git_config_find_xdg_r(&xdg_buf) == 0)
+ xdg_config_path = xdg_buf.ptr;
if (git_config_find_system_r(&system_buf) == 0)
system_config_path = system_buf.ptr;
- res = load_config(&repo->_config, repo, global_config_path, xdr_config_path, system_config_path);
+ res = load_config(&repo->_config, repo, global_config_path, xdg_config_path, system_config_path);
git_buf_free(&global_buf);
git_buf_free(&system_buf);