1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-29 00:51:35 +02:00

trim down gitcommand struct some more

This commit is contained in:
Jesse Duffield
2022-01-07 20:33:34 +11:00
parent e8229f0ee0
commit ee8ff6512f
6 changed files with 58 additions and 32 deletions

View File

@ -6,16 +6,6 @@ import (
"github.com/jesseduffield/lazygit/pkg/utils"
)
func (gui *Gui) gitFlowFinishBranch(branchName string) error {
cmdObj, err := gui.GitCommand.Flow.FinishCmdObj(branchName)
if err != nil {
return gui.surfaceError(err)
}
gui.logAction(gui.Tr.Actions.GitFlowFinish)
return gui.runSubprocessWithSuspenseAndRefresh(cmdObj)
}
func (gui *Gui) handleCreateGitFlowMenu() error {
branch := gui.getSelectedBranch()
if branch == nil {
@ -70,3 +60,13 @@ func (gui *Gui) handleCreateGitFlowMenu() error {
return gui.createMenu("git flow", menuItems, createMenuOptions{})
}
func (gui *Gui) gitFlowFinishBranch(branchName string) error {
cmdObj, err := gui.GitCommand.Flow.FinishCmdObj(branchName)
if err != nil {
return gui.surfaceError(err)
}
gui.logAction(gui.Tr.Actions.GitFlowFinish)
return gui.runSubprocessWithSuspenseAndRefresh(cmdObj)
}