This commit is contained in:
Tony 2026-09-09 13:34:58 -04:00 committed by GitHub
commit e545677bd4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View file

@ -225,6 +225,16 @@ func (self *BranchesHelper) promptWorktreeBranchDelete(
})
},
},
{
Label: self.c.Tr.RemoveWorktreeAndBranch,
Tooltip: self.c.Tr.RemoveWorktreeTooltip,
OnPress: func() error {
if err := self.worktreeHelper.Remove(worktree, false); err != nil {
return err
}
return self.c.Git().Branch.LocalDelete([]string{selectedBranch.Name}, true)
},
},
},
})
}

View file

@ -891,6 +891,7 @@ type TranslationSet struct {
DetachWorktreeTooltip string
Switching string
RemoveWorktree string
RemoveWorktreeAndBranch string
RemoveWorktreeTitle string
RemoveWorktreeMenuTitle string
RemoveWorktreeAndDeleteBranch string
@ -2053,6 +2054,7 @@ func EnglishTranslationSet() *TranslationSet {
DetachWorktreeTooltip: "This will run `git checkout --detach` on the worktree so that it stops hogging the branch, but the worktree's working tree will be left alone.",
Switching: "Switching",
RemoveWorktree: "Remove worktree",
RemoveWorktreeAndBranch: "Remove worktree and branch",
RemoveWorktreeTitle: "Remove worktree",
RemoveWorktreeMenuTitle: "Remove worktree '{{.worktreeName}}'?",
RemoveWorktreeAndDeleteBranch: "Remove worktree and delete branch",