summaryrefslogtreecommitdiff
path: root/worktree.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2016-12-12 10:16:55 -0800
committerJunio C Hamano <gitster@pobox.com>2016-12-12 15:22:32 -0800
commit4ac9006f832d98ca1f25d956e12f3ff79e0d25bc (patch)
tree4915a2ab954bd0431b460b2a1a726b1b29b2cc97 /worktree.c
parent72417640769c91408d15cdbab3160bc494f49c7f (diff)
downloadgit-4ac9006f832d98ca1f25d956e12f3ff79e0d25bc.tar.gz
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 'worktree.c')
-rw-r--r--worktree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/worktree.c b/worktree.c
index f7869f8d60..c90e013985 100644
--- a/worktree.c
+++ b/worktree.c
@@ -255,7 +255,7 @@ struct worktree *find_worktree(struct worktree **list,
return wt;
arg = prefix_filename(prefix, strlen(prefix), arg);
- path = xstrdup(real_path(arg));
+ path = real_pathdup(arg);
for (; *list; list++)
if (!fspathcmp(path, real_path((*list)->path)))
break;