]> git.ipfire.org Git - thirdparty/git.git/commitdiff
worktree: drop unused code from get_linked_worktree()
authorEric Sunshine <sunshine@sunshineco.com>
Fri, 31 Jul 2020 23:32:12 +0000 (19:32 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sat, 1 Aug 2020 02:56:11 +0000 (19:56 -0700)
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>
worktree.c

index c0df5e2c7969c8c032fd83a7d077ca211e980814..fa8366a3ca55f24b987a2c603e8edca0c2163378 100644 (file)
@@ -90,9 +90,6 @@ static struct worktree *get_linked_worktree(const char *id)
                strbuf_strip_suffix(&worktree_path, "/.");
        }
 
-       strbuf_reset(&path);
-       strbuf_addf(&path, "%s/worktrees/%s/HEAD", get_git_common_dir(), id);
-
        worktree = xcalloc(1, sizeof(*worktree));
        worktree->path = strbuf_detach(&worktree_path, NULL);
        worktree->id = xstrdup(id);