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

@ -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;