aboutsummaryrefslogtreecommitdiff
path: root/environment.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@elego.de>2011-03-17 12:26:46 +0100
committerJunio C Hamano <gitster@pobox.com>2011-03-17 16:08:30 -0700
commite2a57aac8a8a2b786739a5a93ea9dcfd2f0fd0e2 (patch)
treeb17a832e94e5b0e6eeff36616a46205f4eb84571 /environment.c
parenta3ca9b0fbe21d7a2525877fe0c008b61c56f7104 (diff)
downloadgit-e2a57aac8a8a2b786739a5a93ea9dcfd2f0fd0e2.tar.gz
git-e2a57aac8a8a2b786739a5a93ea9dcfd2f0fd0e2.tar.xz
Name make_*_path functions more accurately
Rename the make_*_path functions so it's clearer what they do, in particlar make clear what the differnce between make_absolute_path and make_nonrelative_path is by renaming them real_path and absolute_path respectively. make_relative_path has an understandable name and is renamed to relative_path to maintain the name convention. The function calls have been replaced 1-to-1 in their usage. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'environment.c')
-rw-r--r--environment.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/environment.c b/environment.c
index c3efbb960..cc670b156 100644
--- a/environment.c
+++ b/environment.c
@@ -139,7 +139,7 @@ static int git_work_tree_initialized;
void set_git_work_tree(const char *new_work_tree)
{
if (git_work_tree_initialized) {
- new_work_tree = make_absolute_path(new_work_tree);
+ new_work_tree = real_path(new_work_tree);
if (strcmp(new_work_tree, work_tree))
die("internal error: work tree has already been set\n"
"Current worktree: %s\nNew worktree: %s",
@@ -147,7 +147,7 @@ void set_git_work_tree(const char *new_work_tree)
return;
}
git_work_tree_initialized = 1;
- work_tree = xstrdup(make_absolute_path(new_work_tree));
+ work_tree = xstrdup(real_path(new_work_tree));
}
const char *get_git_work_tree(void)