static void mark_current_worktree(struct worktree **worktrees)
{
- char *git_dir = xstrdup(absolute_path(get_git_dir()));
+ char *git_dir = absolute_pathdup(get_git_dir());
int i;
for (i = 0; worktrees[i]; i++) {
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;
struct strbuf sb = STRBUF_INIT;
DIR *dir;
struct dirent *d;
- int ret;
+ int ret = 0;
struct repository_format format;
submodule_gitdir = git_pathdup_submodule(path, "%s", "");