mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 15:46:26 -04:00
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>
36 lines
729 B
Go
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{}})
|
|
}
|