diff --git a/docs/Config.md b/docs/Config.md index 7ffeca39f..044ba10ea 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -31,6 +31,8 @@ to the top of your config file or via [Visual Studio Code settings.json config][ ## Default +This is only meant as a reference for what config options exist, and what their default values are. It is not meant to be copied and pasted into your config file as a whole; that's not a good idea for several reasons. It is recommended to include only those settings in your config file that you actually want to change. + ```yaml # Config relating to the Lazygit UI diff --git a/pkg/gui/controllers/helpers/working_tree_helper.go b/pkg/gui/controllers/helpers/working_tree_helper.go index c967fab92..1cf658818 100644 --- a/pkg/gui/controllers/helpers/working_tree_helper.go +++ b/pkg/gui/controllers/helpers/working_tree_helper.go @@ -155,6 +155,9 @@ func (self *WorkingTreeHelper) HandleCommitPress() error { commitPrefixConfigs := self.commitPrefixConfigsForRepo() for _, commitPrefixConfig := range commitPrefixConfigs { prefixPattern := commitPrefixConfig.Pattern + if prefixPattern == "" { + continue + } prefixReplace := commitPrefixConfig.Replace branchName := self.refHelper.GetCheckedOutRef().Name rgx, err := regexp.Compile(prefixPattern)