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:
@@ -140,10 +140,6 @@ func (self *WorktreeHelper) NewWorktreeCheckout(base string, canCheckoutBase boo
|
|||||||
self.c.Prompt(types.PromptOpts{
|
self.c.Prompt(types.PromptOpts{
|
||||||
Title: self.c.Tr.NewBranchName,
|
Title: self.c.Tr.NewBranchName,
|
||||||
HandleConfirm: func(branchName string) error {
|
HandleConfirm: func(branchName string) error {
|
||||||
if branchName == "" {
|
|
||||||
return errors.New(self.c.Tr.BranchNameCannotBeBlank)
|
|
||||||
}
|
|
||||||
|
|
||||||
opts.Branch = branchName
|
opts.Branch = branchName
|
||||||
|
|
||||||
return f()
|
return f()
|
||||||
|
|||||||
@@ -862,7 +862,6 @@ type TranslationSet struct {
|
|||||||
NewWorktreePath string
|
NewWorktreePath string
|
||||||
NewWorktreeBase string
|
NewWorktreeBase string
|
||||||
RemoveWorktreeTooltip string
|
RemoveWorktreeTooltip string
|
||||||
BranchNameCannotBeBlank string
|
|
||||||
NewBranchName string
|
NewBranchName string
|
||||||
NewBranchNameLeaveBlank string
|
NewBranchNameLeaveBlank string
|
||||||
ViewWorktreeOptions string
|
ViewWorktreeOptions string
|
||||||
@@ -1956,7 +1955,6 @@ func EnglishTranslationSet() *TranslationSet {
|
|||||||
NewWorktreePath: "New worktree path",
|
NewWorktreePath: "New worktree path",
|
||||||
NewWorktreeBase: "New worktree base ref",
|
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.",
|
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",
|
NewBranchName: "New branch name",
|
||||||
NewBranchNameLeaveBlank: "New branch name (leave blank to checkout {{.default}})",
|
NewBranchNameLeaveBlank: "New branch name (leave blank to checkout {{.default}})",
|
||||||
ViewWorktreeOptions: "View worktree options",
|
ViewWorktreeOptions: "View worktree options",
|
||||||
|
|||||||
Reference in New Issue
Block a user