1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-14 03:06:51 +02:00

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>
This commit is contained in:
Eric Sunshine 2020-07-31 19:32:12 -04:00 committed by Junio C Hamano
parent 62573a57f0
commit 246756f775

View 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);