Skip to content

Commit c4e5995

Browse files
committed
Fix bug with deleting remote branch whose name doesn't match local branch
1 parent be3683c commit c4e5995

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

pkg/gui/controllers/branches_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ func (self *BranchesController) localDelete(branch *models.Branch) error {
581581
}
582582

583583
func (self *BranchesController) remoteDelete(branch *models.Branch) error {
584-
return self.c.Helpers().BranchesHelper.ConfirmDeleteRemote(branch.UpstreamRemote, branch.Name)
584+
return self.c.Helpers().BranchesHelper.ConfirmDeleteRemote(branch.UpstreamRemote, branch.UpstreamBranch)
585585
}
586586

587587
func (self *BranchesController) forceDelete(branch *models.Branch) error {

pkg/integration/tests/branch/delete_remote_branch_with_different_name.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,13 @@ var DeleteRemoteBranchWithDifferentName = NewIntegrationTest(NewIntegrationTestA
3737
Tap(func() {
3838
t.ExpectPopup().
3939
Confirmation().
40-
/* EXPECTED:
4140
Title(Equals("Delete branch 'mybranch-remote'?")).
4241
Content(Equals("Are you sure you want to delete the remote branch 'mybranch-remote' from 'origin'?")).
43-
ACTUAL: */
44-
Title(Equals("Delete branch 'mybranch-local'?")).
45-
Content(Equals("Are you sure you want to delete the remote branch 'mybranch-local' from 'origin'?")).
4642
Confirm()
4743
}).
4844
Lines(
4945
Contains("master"),
50-
/* EXPECTED:
5146
Contains("mybranch-local (upstream gone)").IsSelected(),
52-
ACTUAL: */
53-
Contains("mybranch-local ✓").IsSelected(),
5447
)
5548
},
5649
})

0 commit comments

Comments
 (0)