From 6f2f9f6677964195babfbca5bb652f88c085d2cf Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Mon, 17 Jul 2023 09:48:37 +1000 Subject: [PATCH] Assume that the base of a worktree can be checked out --- pkg/gui/controllers/helpers/worktree_helper.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/gui/controllers/helpers/worktree_helper.go b/pkg/gui/controllers/helpers/worktree_helper.go index 602ad3ac3..642378ace 100644 --- a/pkg/gui/controllers/helpers/worktree_helper.go +++ b/pkg/gui/controllers/helpers/worktree_helper.go @@ -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) }, })