File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -1319,7 +1319,7 @@ static int refdb_fs_backend__delete_tail(
13191319 }
13201320
13211321 /* If a loose reference exists, remove it from the filesystem */
1322- if (git_buf_joinpath (& loose_path , backend -> gitpath , ref_name ) < 0 )
1322+ if (git_buf_joinpath (& loose_path , backend -> commonpath , ref_name ) < 0 )
13231323 return -1 ;
13241324
13251325
Original file line number Diff line number Diff line change @@ -134,6 +134,28 @@ void test_worktree_refs__delete_succeeds_after_pruning_worktree(void)
134134 git_reference_free (branch );
135135}
136136
137+ void test_worktree_refs__delete_unrelated_branch_on_worktree (void )
138+ {
139+ git_reference * branch ;
140+
141+ cl_git_pass (git_branch_lookup (& branch , fixture .worktree ,
142+ "merge-conflict" , GIT_BRANCH_LOCAL ));
143+ cl_git_pass (git_branch_delete (branch ));
144+
145+ git_reference_free (branch );
146+ }
147+
148+ void test_worktree_refs__delete_unrelated_branch_on_parent (void )
149+ {
150+ git_reference * branch ;
151+
152+ cl_git_pass (git_branch_lookup (& branch , fixture .repo ,
153+ "merge-conflict" , GIT_BRANCH_LOCAL ));
154+ cl_git_pass (git_branch_delete (branch ));
155+
156+ git_reference_free (branch );
157+ }
158+
137159void test_worktree_refs__renaming_reference_updates_worktree_heads (void )
138160{
139161 git_reference * head , * branch , * renamed ;
You can’t perform that action at this time.
0 commit comments