Allow setting a default name when creating new branches
- PR Description
I commonly prefix my branch names with my first initial and last name, such as this one (ecubit/branch-prefixes). It can be a bit annoying to type out.
This PR adds a config option to set a default value for the name in the branch creation modal.
If there would have previously been a branch name autofilled (I do not know all such cases), this change has no effect.
- 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)
CONTRIBUTING.mdsays I may submit without doing localization (and I am unable)
- [x] Docs (specifically
docs/Config.md) have been updated if necessary - [x] You've read through your own file changes for silly mistakes etc
why not make it repository specific as well, like in predefined commit message prefix.
Thanks for making this @elliotcubit . I've taken the liberty of pushing a change to the test to make it more focused.
@EliasA5 we'll eventually have a proper solution for defining arbitrary repo-specific config values, so I'd rather wait for that than to add another thing like commitPrefixes now. See https://github.com/jesseduffield/lazygit/issues/3293