worktree.c: kill parse_ref() in favor of refs_resolve_ref_unsafe()
The manual parsing code is replaced with a call to refs_resolve_ref_unsafe(). The manual parsing code must die because only refs/files-backend.c should do that. 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
17eff96b83
commit
fa099d2322
3
branch.c
3
branch.c
@ -355,7 +355,8 @@ int replace_each_worktree_head_symref(const char *oldref, const char *newref,
|
||||
for (i = 0; worktrees[i]; i++) {
|
||||
if (worktrees[i]->is_detached)
|
||||
continue;
|
||||
if (strcmp(oldref, worktrees[i]->head_ref))
|
||||
if (worktrees[i]->head_ref &&
|
||||
strcmp(oldref, worktrees[i]->head_ref))
|
||||
continue;
|
||||
|
||||
if (set_worktree_head_symref(get_worktree_git_dir(worktrees[i]),
|
||||
|
Reference in New Issue
Block a user