jesseduffield.lazygit/pkg/gui/controllers/helpers/bisect_helper.go
Stefan Haller 88811e6795 Remove the RefreshMode field
With sync vs async now derived from the calling thread, the Mode field
and its SYNC/ASYNC constants no longer carry any information: Refresh is
always async, RefreshFromWorker always sync. Drop the field, the type,
and the Mode argument at every call site, and reduce the debug log's
mode name to a plain sync/async derived from calledFromWorker.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-17 12:32:32 +02:00

36 lines
729 B
Go

package helpers
import (
"github.com/jesseduffield/lazygit/pkg/gui/types"
)
type BisectHelper struct {
c *HelperCommon
}
func NewBisectHelper(c *HelperCommon) *BisectHelper {
return &BisectHelper{c: c}
}
func (self *BisectHelper) Reset() error {
self.c.Confirm(types.ConfirmOpts{
Title: self.c.Tr.Bisect.ResetTitle,
Prompt: self.c.Tr.Bisect.ResetPrompt,
HandleConfirm: func() error {
self.c.LogAction(self.c.Tr.Actions.ResetBisect)
if err := self.c.Git().Bisect.Reset(); err != nil {
return err
}
self.PostBisectCommandRefresh()
return nil
},
})
return nil
}
func (self *BisectHelper) PostBisectCommandRefresh() {
self.c.Refresh(types.RefreshOptions{Scope: []types.RefreshableView{}})
}