Skip to content

Commit d7e733c

Browse files
committed
Remove now unnecessary check for empty string
As of the previous commit, branchName can no longer be empty, so no need to handle this.
1 parent b3435bd commit d7e733c

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

pkg/gui/controllers/helpers/worktree_helper.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,6 @@ func (self *WorktreeHelper) NewWorktreeCheckout(base string, canCheckoutBase boo
140140
self.c.Prompt(types.PromptOpts{
141141
Title: self.c.Tr.NewBranchName,
142142
HandleConfirm: func(branchName string) error {
143-
if branchName == "" {
144-
return errors.New(self.c.Tr.BranchNameCannotBeBlank)
145-
}
146-
147143
opts.Branch = branchName
148144

149145
return f()

pkg/i18n/english.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,6 @@ type TranslationSet struct {
862862
NewWorktreePath string
863863
NewWorktreeBase string
864864
RemoveWorktreeTooltip string
865-
BranchNameCannotBeBlank string
866865
NewBranchName string
867866
NewBranchNameLeaveBlank string
868867
ViewWorktreeOptions string
@@ -1956,7 +1955,6 @@ func EnglishTranslationSet() *TranslationSet {
19561955
NewWorktreePath: "New worktree path",
19571956
NewWorktreeBase: "New worktree base ref",
19581957
RemoveWorktreeTooltip: "Remove the selected worktree. This will both delete the worktree's directory, as well as metadata about the worktree in the .git directory.",
1959-
BranchNameCannotBeBlank: "Branch name cannot be blank",
19601958
NewBranchName: "New branch name",
19611959
NewBranchNameLeaveBlank: "New branch name (leave blank to checkout {{.default}})",
19621960
ViewWorktreeOptions: "View worktree options",

0 commit comments

Comments
 (0)