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:
committed by
Junio C Hamano
parent
7241764076
commit
4ac9006f83
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user