summaryrefslogtreecommitdiff
path: root/branch.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-04-22 13:01:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-04-22 21:09:37 (GMT)
commit69dfe3b9420eb2a7f479a0a4cad663111af2b1f9 (patch)
tree7e179e067824fa9e04d784c6f3b8a50eb9ce2bb5 /branch.c
parent15cdfea734ffce99d930e8e8016787b57ac47386 (diff)
downloadgit-69dfe3b9420eb2a7f479a0a4cad663111af2b1f9.zip
git-69dfe3b9420eb2a7f479a0a4cad663111af2b1f9.tar.gz
git-69dfe3b9420eb2a7f479a0a4cad663111af2b1f9.tar.bz2
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>
Diffstat (limited to 'branch.c')
-rw-r--r--branch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/branch.c b/branch.c
index 4162443..0674a99 100644
--- 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);