real_path: have callers use real_pathdup and strbuf_realpath

Migrate callers of real_path() who duplicate the retern value to use
real_pathdup or strbuf_realpath.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Brandon Williams
2016-12-12 10:16:55 -08:00
committed by Junio C Hamano
parent 7241764076
commit 4ac9006f83
7 changed files with 16 additions and 13 deletions

View File

@ -259,7 +259,7 @@ void set_git_work_tree(const char *new_work_tree)
return;
}
git_work_tree_initialized = 1;
work_tree = xstrdup(real_path(new_work_tree));
work_tree = real_pathdup(new_work_tree);
}
const char *get_git_work_tree(void)