Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commitPrefix options doesn't work #3556

Open
zeromask1337 opened this issue May 10, 2024 · 3 comments
Open

commitPrefix options doesn't work #3556

zeromask1337 opened this issue May 10, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@zeromask1337
Copy link
Contributor

Describe the bug
commitPrefix option simply doesn't work. However if I replace it with commitPrefixes with same options as first one, then it works.

This works

git:
  commitPrefixes:
    my_project:
      pattern: "^\\w+\\/(\\w+-\\w+).*"
      replace: "[$1] "

This doesn't

git:
  commitPrefix:
      pattern: "^\\w+\\/(\\w+-\\w+).*"
      replace: "[$1] "

To Reproduce
Steps to reproduce the behavior:

  1. Go to your config file, .config/lazygit/config.yml in my case
  2. Paste and save
git:
  commitPrefix:
      pattern: "^\\w+\\/(\\w+-\\w+).*"
      replace: "[$1] "
  1. Restart lazygit
  2. Try to commit and see no prefix

Expected behavior
Prefix is present in commit message

Version info:
Run lazygit --version and paste the result here commit=, build date=, build source=homebrew, version=0.40.2, os=darwin, arch=arm64, git version=2.39.3 (Apple Git-145)
Run git --version and paste the result here git version 2.39.3 (Apple Git-145)

@zeromask1337 zeromask1337 added the bug Something isn't working label May 10, 2024
@stefanhaller
Copy link
Collaborator

This is not released yet. You'll have to build from master to get it.

@zeromask1337
Copy link
Contributor Author

Oh, I get it. Maybe point that out in docs? LIke 👇

Warning

This feature is not yet in production. You have to manually build from master to get it.

@kgrhartlage
Copy link

However if I replace it with commitPrefixes with same options as first one, then it works.

For me commitPrefixes only seems to work for the branch that I was on when starting lazygit. Once I switch branches within lazygit, I still end up with the prefix that corresponds to that "initial" branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants