From 196761a40a6264ac9598d97eaf91083f23f3f60e Mon Sep 17 00:00:00 2001 From: Davyd McColl Date: Thu, 19 Nov 2020 13:01:26 +0200 Subject: [PATCH] :bug: should only stage all if configured to do so _and_ there are no items staged --- pkg/gui/files_panel.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go index 56c375af7..f8a667bc6 100644 --- a/pkg/gui/files_panel.go +++ b/pkg/gui/files_panel.go @@ -302,13 +302,13 @@ func (gui *Gui) commitPrefixConfigForRepo() *config.CommitPrefixConfig { } func (gui *Gui) canCommitNow() bool { + if len(gui.stagedFiles()) > 0 { + return true + } if gui.Config.GetUserConfig().Gui.SkipNoStagedFilesWarning { err := gui.GitCommand.StageAll() return err == nil } - if len(gui.stagedFiles()) > 0 { - return true - } return false }