1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-11 11:42:12 +02:00

prevent spamming pull or push buttons

This commit is contained in:
Jesse Duffield 2020-08-23 11:13:51 +10:00
parent a95fd581fd
commit 5cdfd41dca

View File

@ -425,6 +425,10 @@ func (gui *Gui) refreshStateFiles() error {
}
func (gui *Gui) handlePullFiles(g *gocui.Gui, v *gocui.View) error {
if gui.popupPanelFocused() {
return nil
}
// if we have no upstream branch we need to set that first
currentBranch := gui.currentBranch()
if currentBranch.Pullables == "?" {
@ -526,6 +530,10 @@ func (gui *Gui) pushWithForceFlag(v *gocui.View, force bool, upstream string, ar
}
func (gui *Gui) pushFiles(g *gocui.Gui, v *gocui.View) error {
if gui.popupPanelFocused() {
return nil
}
// if we have pullables we'll ask if the user wants to force push
currentBranch := gui.currentBranch()