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

🐛 should only stage all if configured to do so _and_ there are no items staged

This commit is contained in:
Davyd McColl 2020-11-19 13:01:26 +02:00 committed by Jesse Duffield
parent 26d5444919
commit 196761a40a

View File

@ -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
}