File tree Expand file tree Collapse file tree 1 file changed +0
-4
lines changed Expand file tree Collapse file tree 1 file changed +0
-4
lines changed Original file line number Diff line number Diff line change @@ -47,15 +47,12 @@ static void add_head_info(struct worktree *wt)
47
47
static struct worktree * get_main_worktree (void )
48
48
{
49
49
struct worktree * worktree = NULL ;
50
- struct strbuf path = STRBUF_INIT ;
51
50
struct strbuf worktree_path = STRBUF_INIT ;
52
51
53
52
strbuf_add_absolute_path (& worktree_path , get_git_common_dir ());
54
53
if (!strbuf_strip_suffix (& worktree_path , "/.git" ))
55
54
strbuf_strip_suffix (& worktree_path , "/." );
56
55
57
- strbuf_addf (& path , "%s/HEAD" , get_git_common_dir ());
58
-
59
56
worktree = xcalloc (1 , sizeof (* worktree ));
60
57
worktree -> path = strbuf_detach (& worktree_path , NULL );
61
58
/*
@@ -69,7 +66,6 @@ static struct worktree *get_main_worktree(void)
69
66
is_bare_repository ();
70
67
add_head_info (worktree );
71
68
72
- strbuf_release (& path );
73
69
strbuf_release (& worktree_path );
74
70
return worktree ;
75
71
}
You can’t perform that action at this time.
0 commit comments