1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-23 12:18:51 +02:00

Assume that the base of a worktree can be checked out

This commit is contained in:
Jesse Duffield 2023-07-17 09:48:37 +10:00
parent 2082fdf84a
commit 6f2f9f6677

View File

@ -76,7 +76,8 @@ func (self *WorktreeHelper) NewWorktree() error {
InitialContent: currentBranchName,
FindSuggestionsFunc: self.suggestionsHelper.GetRefsSuggestionsFunc(),
HandleConfirm: func(base string) error {
canCheckoutBase := base != currentBranchName
// we assume that the base can be checked out
canCheckoutBase := true
return self.NewWorktreeCheckout(base, canCheckoutBase, detached)
},
})