mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
allow spamming the p key
This commit is contained in:
committed by
github-actions[bot]
parent
d2d88fe64e
commit
0f7003d939
@ -475,6 +475,9 @@ func (gui *Gui) pullFiles(opts PullFilesOptions) error {
|
||||
}
|
||||
|
||||
func (gui *Gui) pullWithMode(mode string, opts PullFilesOptions) error {
|
||||
gui.State.FetchMutex.Lock()
|
||||
defer gui.State.FetchMutex.Unlock()
|
||||
|
||||
err := gui.GitCommand.Fetch(
|
||||
commands.FetchOptions{
|
||||
PromptUserForCredential: gui.promptUserForCredential,
|
||||
|
@ -165,6 +165,9 @@ func (gui *Gui) handleInfoClick(g *gocui.Gui, v *gocui.View) error {
|
||||
}
|
||||
|
||||
func (gui *Gui) fetch(canPromptForCredentials bool) (err error) {
|
||||
gui.State.FetchMutex.Lock()
|
||||
defer gui.State.FetchMutex.Unlock()
|
||||
|
||||
fetchOpts := commands.FetchOptions{}
|
||||
if canPromptForCredentials {
|
||||
fetchOpts.PromptUserForCredential = gui.promptUserForCredential
|
||||
|
@ -287,6 +287,7 @@ type guiState struct {
|
||||
IsRefreshingFiles bool
|
||||
RefreshingFilesMutex sync.Mutex
|
||||
RefreshingStatusMutex sync.Mutex
|
||||
FetchMutex sync.Mutex
|
||||
Searching searchingState
|
||||
ScreenMode int
|
||||
SideView *gocui.View
|
||||
|
@ -158,6 +158,9 @@ func (gui *Gui) handleFetchRemote(g *gocui.Gui, v *gocui.View) error {
|
||||
}
|
||||
|
||||
return gui.WithWaitingStatus(gui.Tr.SLocalize("FetchingRemoteStatus"), func() error {
|
||||
gui.State.FetchMutex.Lock()
|
||||
defer gui.State.FetchMutex.Unlock()
|
||||
|
||||
if err := gui.GitCommand.FetchRemote(remote.Name); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user