1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-17 21:18:31 +02:00

Fix deletion of unmerged branches in languages other than English

This commit is contained in:
Ryooooooga 2021-09-04 21:01:38 +09:00
parent 0543d43f10
commit 57f7051590
No known key found for this signature in database
GPG Key ID: 07CF200DFCC20C25

View File

@ -298,7 +298,7 @@ func (gui *Gui) deleteNamedBranch(selectedBranch *models.Branch, force bool) err
handleConfirm: func() error {
if err := gui.GitCommand.WithSpan(gui.Tr.Spans.DeleteBranch).DeleteBranch(selectedBranch.Name, force); err != nil {
errMessage := err.Error()
if !force && strings.Contains(errMessage, "is not fully merged") {
if !force && strings.Contains(errMessage, "git branch -D ") {
return gui.deleteNamedBranch(selectedBranch, true)
}
return gui.createErrorPanel(errMessage)