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:
parent
26d5444919
commit
196761a40a
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user