completion: put matching ctags symbol names directly into COMPREPLY
[gitweb.git] / worktree.c
index 828fd7a0ad4243749acffb9ef7885e95b8bb2bd0..d633761575bff4811fa4f3f3822807b1f77f5ecb 100644 (file)
@@ -145,7 +145,7 @@ static struct worktree *get_linked_worktree(const char *id)
 
 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++) {
@@ -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;