1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-27 22:38:09 +02:00

Remove now unnecessary check for empty string

As of the previous commit, branchName can no longer be empty, so no need to
handle this.
This commit is contained in:
Stefan Haller
2025-11-15 14:48:04 +01:00
parent b3435bd59c
commit d7e733cd56
2 changed files with 0 additions and 6 deletions

View File

@@ -140,10 +140,6 @@ func (self *WorktreeHelper) NewWorktreeCheckout(base string, canCheckoutBase boo
self.c.Prompt(types.PromptOpts{
Title: self.c.Tr.NewBranchName,
HandleConfirm: func(branchName string) error {
if branchName == "" {
return errors.New(self.c.Tr.BranchNameCannotBeBlank)
}
opts.Branch = branchName
return f()

View File

@@ -862,7 +862,6 @@ type TranslationSet struct {
NewWorktreePath string
NewWorktreeBase string
RemoveWorktreeTooltip string
BranchNameCannotBeBlank string
NewBranchName string
NewBranchNameLeaveBlank string
ViewWorktreeOptions string
@@ -1956,7 +1955,6 @@ func EnglishTranslationSet() *TranslationSet {
NewWorktreePath: "New worktree path",
NewWorktreeBase: "New worktree base ref",
RemoveWorktreeTooltip: "Remove the selected worktree. This will both delete the worktree's directory, as well as metadata about the worktree in the .git directory.",
BranchNameCannotBeBlank: "Branch name cannot be blank",
NewBranchName: "New branch name",
NewBranchNameLeaveBlank: "New branch name (leave blank to checkout {{.default}})",
ViewWorktreeOptions: "View worktree options",