lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Add commitPrefix for defining a prefix for any project

Open duckbrain opened this issue 1 year ago • 2 comments

  • PR Description

Adds a new option git.comitPrefix to act similarly to git.commitPrefixes, except, if defined, it applies to any repo that doesn't have an entry in git.commitPrefixes.

  • 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)
  • [x] Text is internationalised (see here)
  • [x] Docs (specifically docs/Config.md) have been updated if necessary
  • [x] You've read through your own file changes for silly mistakes etc

duckbrain avatar Feb 01 '24 14:02 duckbrain

See:

https://github.com/jesseduffield/lazygit/discussions/2759 https://github.com/jesseduffield/lazygit/discussions/1941

duckbrain avatar Feb 01 '24 15:02 duckbrain

Makes sense to me. (I haven't looked at the code yet, though.)

As a followup I propose to support per-repo config files (see #3293) and get rid of the commitPrefixes option.

stefanhaller avatar Feb 01 '24 18:02 stefanhaller

As a followup I propose to support per-repo config files (see https://github.com/jesseduffield/lazygit/issues/3293) and get rid of the commitPrefixes option.

Was this an ask for this PR or future plans? I had been understanding the latter. I agree that's a sensible way to move forward, but it seems out of scope to do that all at once.

duckbrain avatar Apr 30 '24 15:04 duckbrain

No, not for this one. Is "followup" not a commonly used term in software development? At work we use it for things that we will do in a separate PR later.

One of these days I'll actually get around to reviewing this PR, sorry that it fell through the cracks. Feel free to ping earlier when a PR doesn't get reviewed!

stefanhaller avatar Apr 30 '24 15:04 stefanhaller

Looks good, great work. I took the liberty to squash all commits into one, I think it makes sense in this case. Also rebased on master in order to be able to merge.

Sorry again for the long delay in reviewing this.

stefanhaller avatar May 01 '24 17:05 stefanhaller