mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-13 00:56:25 -04:00
Cleanup: wrap long parameter lists
This makes the following diff a little easier to read.
This commit is contained in:
parent
3f8dc527b5
commit
5d5aa0a865
|
|
@ -23,7 +23,13 @@ func NewGpgHelper(c *HelperCommon) *GpgHelper {
|
|||
// WithWaitingStatus we get stuck there and can't return to lazygit. We could
|
||||
// fix this bug, or just stop running subprocesses from within there, given that
|
||||
// we don't need to see a loading status if we're in a subprocess.
|
||||
func (self *GpgHelper) WithGpgHandling(cmdObj *oscommands.CmdObj, configKey git_commands.GpgConfigKey, waitingStatus string, onSuccess func() error, refreshScope []types.RefreshableView) error {
|
||||
func (self *GpgHelper) WithGpgHandling(
|
||||
cmdObj *oscommands.CmdObj,
|
||||
configKey git_commands.GpgConfigKey,
|
||||
waitingStatus string,
|
||||
onSuccess func() error,
|
||||
refreshScope []types.RefreshableView,
|
||||
) error {
|
||||
useSubprocess := self.c.Git().Config.NeedsGpgSubprocess(configKey)
|
||||
if useSubprocess {
|
||||
success, err := self.c.RunSubprocess(cmdObj)
|
||||
|
|
@ -40,7 +46,12 @@ func (self *GpgHelper) WithGpgHandling(cmdObj *oscommands.CmdObj, configKey git_
|
|||
return self.runAndStream(cmdObj, waitingStatus, onSuccess, refreshScope)
|
||||
}
|
||||
|
||||
func (self *GpgHelper) runAndStream(cmdObj *oscommands.CmdObj, waitingStatus string, onSuccess func() error, refreshScope []types.RefreshableView) error {
|
||||
func (self *GpgHelper) runAndStream(
|
||||
cmdObj *oscommands.CmdObj,
|
||||
waitingStatus string,
|
||||
onSuccess func() error,
|
||||
refreshScope []types.RefreshableView,
|
||||
) error {
|
||||
return self.c.WithWaitingStatus(waitingStatus, func(gocui.Task) error {
|
||||
if err := cmdObj.StreamOutput().Run(); err != nil {
|
||||
self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: refreshScope})
|
||||
|
|
|
|||
Loading…
Reference in a new issue