mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 04:45:47 +02:00
Fix bug with deleting remote branch whose name doesn't match local branch
This commit is contained in:
parent
be3683ccc8
commit
c4e5995cb9
2 changed files with 1 additions and 8 deletions
|
@ -581,7 +581,7 @@ func (self *BranchesController) localDelete(branch *models.Branch) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *BranchesController) remoteDelete(branch *models.Branch) error {
|
func (self *BranchesController) remoteDelete(branch *models.Branch) error {
|
||||||
return self.c.Helpers().BranchesHelper.ConfirmDeleteRemote(branch.UpstreamRemote, branch.Name)
|
return self.c.Helpers().BranchesHelper.ConfirmDeleteRemote(branch.UpstreamRemote, branch.UpstreamBranch)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *BranchesController) forceDelete(branch *models.Branch) error {
|
func (self *BranchesController) forceDelete(branch *models.Branch) error {
|
||||||
|
|
|
@ -37,20 +37,13 @@ var DeleteRemoteBranchWithDifferentName = NewIntegrationTest(NewIntegrationTestA
|
||||||
Tap(func() {
|
Tap(func() {
|
||||||
t.ExpectPopup().
|
t.ExpectPopup().
|
||||||
Confirmation().
|
Confirmation().
|
||||||
/* EXPECTED:
|
|
||||||
Title(Equals("Delete branch 'mybranch-remote'?")).
|
Title(Equals("Delete branch 'mybranch-remote'?")).
|
||||||
Content(Equals("Are you sure you want to delete the remote branch 'mybranch-remote' from 'origin'?")).
|
Content(Equals("Are you sure you want to delete the remote branch 'mybranch-remote' from 'origin'?")).
|
||||||
ACTUAL: */
|
|
||||||
Title(Equals("Delete branch 'mybranch-local'?")).
|
|
||||||
Content(Equals("Are you sure you want to delete the remote branch 'mybranch-local' from 'origin'?")).
|
|
||||||
Confirm()
|
Confirm()
|
||||||
}).
|
}).
|
||||||
Lines(
|
Lines(
|
||||||
Contains("master"),
|
Contains("master"),
|
||||||
/* EXPECTED:
|
|
||||||
Contains("mybranch-local (upstream gone)").IsSelected(),
|
Contains("mybranch-local (upstream gone)").IsSelected(),
|
||||||
ACTUAL: */
|
|
||||||
Contains("mybranch-local ✓").IsSelected(),
|
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue