@matheusbsbs / matheus-bagliano / commits / 246756f775
Fork 0

worktree: drop unused code from get_linked_worktree()

This code has been unused since fa099d2322 (worktree.c: kill parse_ref() in favor of refs_resolve_ref_unsafe(), 2017-04-24), so drop it. 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 246756f775bdd3055da969a16d9e9c74e76a3e06
1 file changed -3
worktree.c
-3
@@ -90,9 +90,6 @@ static struct worktree *get_linked_worktree(const char *id)
90 strbuf_strip_suffix(&worktree_path, "/.");
91 }
92
93 - strbuf_reset(&path);
94 - strbuf_addf(&path, "%s/worktrees/%s/HEAD", get_git_common_dir(), id);
95 -
93 worktree = xcalloc(1, sizeof(*worktree));
94 worktree->path = strbuf_detach(&worktree_path, NULL);
95 worktree->id = xstrdup(id);