@matheusbsbs / matheus-bagliano / commits / 62573a57f0
Fork 0

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>

Eric Sunshine committed Jul 31, 2020 at 19:32 UTC 62573a57f0919f4d1129962b09462946e69025ff
1 file changed -2
worktree.c
-2
@@ -66,8 +66,6 @@ static struct worktree *get_main_worktree(void)
66 worktree->is_bare = (is_bare_repository_cfg == 1) ||
67 is_bare_repository();
68 add_head_info(worktree);
69 -
70 - strbuf_release(&worktree_path);
69 return worktree;
70 }
71