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)
4747static struct worktree * get_main_worktree (void )
4848{
4949 struct worktree * worktree = NULL ;
50- struct strbuf path = STRBUF_INIT ;
5150 struct strbuf worktree_path = STRBUF_INIT ;
5251
5352 strbuf_add_absolute_path (& worktree_path , get_git_common_dir ());
5453 if (!strbuf_strip_suffix (& worktree_path , "/.git" ))
5554 strbuf_strip_suffix (& worktree_path , "/." );
5655
57- strbuf_addf (& path , "%s/HEAD" , get_git_common_dir ());
58-
5956 worktree = xcalloc (1 , sizeof (* worktree ));
6057 worktree -> path = strbuf_detach (& worktree_path , NULL );
6158 /*
@@ -69,7 +66,6 @@ static struct worktree *get_main_worktree(void)
6966 is_bare_repository ();
7067 add_head_info (worktree );
7168
72- strbuf_release (& path );
7369 strbuf_release (& worktree_path );
7470 return worktree ;
7571}
You can’t perform that action at this time.
0 commit comments