summaryrefslogtreecommitdiffstats
path: root/pkg/gui/controllers/helpers/worktree_helper.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2023-07-17 09:48:37 +1000
committerJesse Duffield <jessedduffield@gmail.com>2023-07-30 18:35:22 +1000
commit6f2f9f6677964195babfbca5bb652f88c085d2cf (patch)
tree7b80056af6b62fab6ebc39e99cf49205f660e50c /pkg/gui/controllers/helpers/worktree_helper.go
parent2082fdf84a823b7533792b99e5e3a5c3334586e9 (diff)
Assume that the base of a worktree can be checked out
Diffstat (limited to 'pkg/gui/controllers/helpers/worktree_helper.go')
-rw-r--r--pkg/gui/controllers/helpers/worktree_helper.go3
1 files changed, 2 insertions, 1 deletions
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)
},
})