summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Eric Sunshine <sunshine@sunshineco.com>2020-07-31 19:32:11 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-07-31 19:56:10 -0700
commit62573a57f0919f4d1129962b09462946e69025ff (patch)
treeff1eace7ce5da36d41e36140f7a86baa70c21fff
parentGit 2.28 (diff)
downloadtgif-62573a57f0919f4d1129962b09462946e69025ff.tar.xz
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>
-rw-r--r--worktree.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/worktree.c b/worktree.c
index cba2e54598..c0df5e2c79 100644
--- a/worktree.c
+++ b/worktree.c
@@ -66,8 +66,6 @@ static struct worktree *get_main_worktree(void)
worktree->is_bare = (is_bare_repository_cfg == 1) ||
is_bare_repository();
add_head_info(worktree);
-
- strbuf_release(&worktree_path);
return worktree;
}