1
0
mirror of https://github.com/git/git.git synced 2024-09-29 19:01:25 +02:00

worktree: drop pointless strbuf_release()

The content of this strbuf is unconditionally detached several lines
before the strbuf_release() and the strbuf is never touched again after
that point.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Eric Sunshine 2020-07-31 19:32:11 -04:00 committed by Junio C Hamano
parent 47ae905ffb
commit 62573a57f0

@ -66,8 +66,6 @@ static struct worktree *get_main_worktree(void)
worktree->is_bare = (is_bare_repository_cfg == 1) || worktree->is_bare = (is_bare_repository_cfg == 1) ||
is_bare_repository(); is_bare_repository();
add_head_info(worktree); add_head_info(worktree);
strbuf_release(&worktree_path);
return worktree; return worktree;
} }