Skip to content

commitPrefixes not working #2215

@max-two

Description

@max-two

Describe the bug
I'm pretty certain this is user error rather than an actual bug, but I didn't know where else to ask. I have just installed lazygit and wanted to add a commit prefix but I cannot get it to work and I'm unsure how to debug this.

I have added the exact config from the docs and tested the regex in regexr.com against my branch name (trevordavis/sc-138414/migrate-selectinterviewers-to-rktq) and it matches correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Add configuration from https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-commit-message-prefix to config file
  2. Make a commit on a branch that should match the regex pattern (trevordavis/sc-138414/migrate-selectinterviewers-to-rktq in my case)
  3. See that commit does not have prefix in commit message

Expected behavior
I would expect the prefix to be in the commit message

Screenshots
My config (the nerd font icons do show up, so I'm confident the config is being read from):
image

I did try to run in debug mode and saw this error log when running a commit. Not entirely sure what to make of it though:
image

Version info:
Run lazygit --version and paste the result here
commit=367b0d331836c90c015bf0c45f88612f3d94d08a, build date=2022-07-20T09:27:56Z, build source=binaryRelease, version=0.35, os=darwin, arch=amd64

Run git --version and paste the result here
git version 2.37.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions