jesseduffield / jesseduffield/lazygit

`commitPrefix` options doesn't work

Open
#3,556 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**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
```yaml
git:
commitPrefixes:
my_project:
pattern: "^\\w+\\/(\\w+-\\w+).*"
replace: "[$1] "
```

This doesn't
```yaml
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
```yaml
git:
commitPrefix:
pattern: "^\\w+\\/(\\w+-\\w+).*"
replace: "[$1] "
```
4. Restart lazygit
5. 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)`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.