summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2008-10-27 11:22:09 +0100
committerJunio C Hamano <gitster@pobox.com>2008-10-30 17:52:24 -0700
commita4f34cbb4cea1f0b0e625b528f269f4b517c64f8 (patch)
treed17b28dc28f2f182c169030bd618a625a65b865c /config.c
parentaba13e7c0566f578f866504bfcb388a72f7e5079 (diff)
downloadgit-a4f34cbb4cea1f0b0e625b528f269f4b517c64f8.tar.gz
Use git_pathdup instead of xstrdup(git_path(...))
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.c')
-rw-r--r--config.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/config.c b/config.c
index 53f04a076a..82807c83b2 100644
--- a/config.c
+++ b/config.c
@@ -630,7 +630,7 @@ int git_config(config_fn_t fn, void *data)
free(user_config);
}
- repo_config = xstrdup(git_path("config"));
+ repo_config = git_pathdup("config");
ret += git_config_from_file(fn, repo_config, data);
free(repo_config);
return ret;
@@ -872,7 +872,7 @@ int git_config_set_multivar(const char* key, const char* value,
if (config_exclusive_filename)
config_filename = xstrdup(config_exclusive_filename);
else
- config_filename = xstrdup(git_path("config"));
+ config_filename = git_pathdup("config");
/*
* Since "key" actually contains the section name and the real
@@ -1132,7 +1132,7 @@ int git_config_rename_section(const char *old_name, const char *new_name)
if (config_exclusive_filename)
config_filename = xstrdup(config_exclusive_filename);
else
- config_filename = xstrdup(git_path("config"));
+ config_filename = git_pathdup("config");
out_fd = hold_lock_file_for_update(lock, config_filename, 0);
if (out_fd < 0) {
ret = error("could not lock config file %s", config_filename);