1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

Pass a remote branch to ConfirmDeleteRemote

Since we want to select multiselections, this will make it easier to pass a
slice of remote branches. It does require that for the case of the local
branches panel we need to synthesize a RemoteBranch object from the selected
local branch, but that's not hard.
This commit is contained in:
Stefan Haller
2024-11-23 18:03:43 +01:00
parent e98cc4d016
commit 92bce7de43
3 changed files with 8 additions and 7 deletions

View File

@ -525,7 +525,8 @@ func (self *BranchesController) localDelete(branch *models.Branch) error {
}
func (self *BranchesController) remoteDelete(branch *models.Branch) error {
return self.c.Helpers().BranchesHelper.ConfirmDeleteRemote(branch.UpstreamRemote, branch.UpstreamBranch)
remoteBranch := &models.RemoteBranch{Name: branch.UpstreamBranch, RemoteName: branch.UpstreamRemote}
return self.c.Helpers().BranchesHelper.ConfirmDeleteRemote(remoteBranch)
}
func (self *BranchesController) localAndRemoteDelete(branch *models.Branch) error {