lazygit
lazygit copied to clipboard
Only add commit prefix if branch name matches regex pattern
- PR Description Currently if a branch name does not match a regex pattern defined in the config.yaml (commitPrefix/es) the commit message box is populated with the branch name as is - this does not match expectations. A prefix should only be added if there is a match on the regex pattern.
This PR seeks to change that by checking for a match before calling ReplaceAllString - see Issue #3695
- Please check if the PR fulfills these requirements
- [x] Cheatsheets are up-to-date (run
go generate ./...) - [x] Code has been formatted (see here)
- [x] Tests have been added/updated (see here for the integration test guide)
- [-] Text is internationalised (see here)
- [-] Docs have been updated if necessary
- [x] You've read through your own file changes for silly mistakes etc