worktree.c: store "id" instead of "git_dir"
We can reconstruct git_dir from id quite easily. It's a bit hackier to do the reverse. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
15cdfea734
commit
69dfe3b942
3
branch.c
3
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);
|
||||
|
Reference in New Issue
Block a user