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

simplify how we log commands

This commit is contained in:
Jesse Duffield
2022-01-05 11:57:32 +11:00
parent e524e39842
commit 05fa483f48
44 changed files with 291 additions and 233 deletions

View File

@ -31,8 +31,9 @@ func (gui *Gui) gitFlowFinishBranch(gitFlowConfig string, branchName string) err
return gui.createErrorPanel(gui.Tr.NotAGitFlowBranch)
}
gui.logSpan(gui.Tr.Spans.GitFlowFinish)
return gui.runSubprocessWithSuspenseAndRefresh(
gui.GitCommand.WithSpan(gui.Tr.Spans.GitFlowFinish).Cmd.New("git flow " + branchType + " finish " + suffix).Log(),
gui.GitCommand.Cmd.New("git flow " + branchType + " finish " + suffix),
)
}
@ -55,8 +56,9 @@ func (gui *Gui) handleCreateGitFlowMenu() error {
return gui.prompt(promptOpts{
title: title,
handleConfirm: func(name string) error {
gui.logSpan(gui.Tr.Spans.GitFlowStart)
return gui.runSubprocessWithSuspenseAndRefresh(
gui.GitCommand.WithSpan(gui.Tr.Spans.GitFlowStart).Cmd.New("git flow " + branchType + " start " + name).Log(),
gui.GitCommand.Cmd.New("git flow " + branchType + " start " + name),
)
},
})