Cleanup: wrap long parameter lists

This makes the following diff a little easier to read.
This commit is contained in:
Stefan Haller 2026-06-23 08:30:47 +02:00
parent 3f8dc527b5
commit 5d5aa0a865

View file

@ -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})