worktree.c: store "id" instead of "git_dir"
[gitweb.git] / branch.c
index 416244370783adcd7648ae7c03c7d0d8cf778b12..0674a993283f13b2c6aae04bed8cbb23ab7a50d2 100644 (file)
--- a/branch.c
+++ b/branch.c
@@ -357,7 +357,8 @@ int replace_each_worktree_head_symref(const char *oldref, const char *newref)
                if (strcmp(oldref, worktrees[i]->head_ref))
                        continue;
 
-               if (set_worktree_head_symref(worktrees[i]->git_dir, newref)) {
+               if (set_worktree_head_symref(get_worktree_git_dir(worktrees[i]),
+                                            newref)) {
                        ret = -1;
                        error(_("HEAD of working tree %s is not updated"),
                              worktrees[i]->path);