diff options
author | Davyd McColl <davydm@gmail.com> | 2020-11-19 13:01:26 +0200 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-11-28 10:27:28 +1100 |
commit | 196761a40a6264ac9598d97eaf91083f23f3f60e (patch) | |
tree | df8d73063774e44e27ee3f7e7426d5b5c6dc03ec /pkg/gui/files_panel.go | |
parent | 26d5444919a04169d970f662cd1ac6ce4de026a1 (diff) |
:bug: should only stage all if configured to do so _and_ there are no items staged
Diffstat (limited to 'pkg/gui/files_panel.go')
-rw-r--r-- | pkg/gui/files_panel.go | 6 |
1 files 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 } |