[PATCH 2/4] worktree: drop unused code from get_linked_worktree()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---

Notes:
    This is a companion to 02bbbe9df9 (worktree: drop unused code from
    get_main_worktree(), 2020-02-23), which also cleaned up fallout from
    fa099d2322 (worktree.c: kill parse_ref() in favor of
    refs_resolve_ref_unsafe(), 2017-04-24).

 worktree.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/worktree.c b/worktree.c
index c0df5e2c79..fa8366a3ca 100644
--- a/worktree.c
+++ b/worktree.c
@@ -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);
-- 
2.28.0.203.gce1f2e0ef1




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux