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 67e6e4e8fd
commit a8aafbc6af

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)
},
})