mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-10-17 20:31:19 +03:00
Add config option gui.skipSwitchWorktreeOnCheckoutWarning
This commit is contained in:
@@ -420,15 +420,13 @@ func (self *BranchesController) promptToCheckoutWorktree(worktree *models.Worktr
|
||||
"worktreeName": worktree.Name,
|
||||
})
|
||||
|
||||
self.c.Confirm(types.ConfirmOpts{
|
||||
return self.c.ConfirmIf(!self.c.UserConfig().Gui.SkipSwitchWorktreeOnCheckoutWarning, types.ConfirmOpts{
|
||||
Title: self.c.Tr.SwitchToWorktree,
|
||||
Prompt: prompt,
|
||||
HandleConfirm: func() error {
|
||||
return self.c.Helpers().Worktree.Switch(worktree, context.LOCAL_BRANCHES_CONTEXT_KEY)
|
||||
},
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (self *BranchesController) handleCreatePullRequest(selectedBranch *models.Branch) error {
|
||||
|
Reference in New Issue
Block a user