summaryrefslogtreecommitdiffstats
path: root/submodule.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2016-12-12 19:16:55 +0100
committerJunio C Hamano <gitster@pobox.com>2016-12-13 00:22:32 +0100
commit4ac9006f832d98ca1f25d956e12f3ff79e0d25bc (patch)
tree4915a2ab954bd0431b460b2a1a726b1b29b2cc97 /submodule.c
parentreal_path: create real_pathdup (diff)
downloadgit-4ac9006f832d98ca1f25d956e12f3ff79e0d25bc.tar.xz
git-4ac9006f832d98ca1f25d956e12f3ff79e0d25bc.zip
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>
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/submodule.c b/submodule.c
index 6f7d883de9..c85ba50110 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1227,7 +1227,7 @@ void connect_work_tree_and_git_dir(const char *work_tree, const char *git_dir)
{
struct strbuf file_name = STRBUF_INIT;
struct strbuf rel_path = STRBUF_INIT;
- const char *real_work_tree = xstrdup(real_path(work_tree));
+ const char *real_work_tree = real_pathdup(work_tree);
/* Update gitfile */
strbuf_addf(&file_name, "%s/.git", work_tree);