Skip to content

Clarify regex flavor and mechanics in docs #4105

@zeromask1337

Description

@zeromask1337

Is your feature request related to a problem? Please describe.
Right now docs doesn't clarify what flavor of regex lazygit is using. It results in many hours of trying different combination that ends with frustration. We need a way to make this process less painfull.

Describe the solution you'd like
For a minimum requirement I suggest providing explanation of regex flavor that is being used. I tried Golang one, but failed. We need more examples with popular variants, and also some quickfixes for most popular prefix problems.
We can also add custom script with real time regex test, that runs on existing branches.

Describe alternatives you've considered
I considered using custom script, but it seems little bit overkill for what we are trying to achieve

Additional context
I tried this config

gui:
  branchColors:
    "feature": "#11aaff"
git:
  commitPrefixes:
    some-front:
      pattern: ([a-zA-Z0-9]+-?\\d+)
      replace: '[$1] '
    shopping-2:
      pattern: ^feature/([A-Z]+-\d+)
      replace: '[$1] '
    shopping-3:
      pattern: ^feature/[A-Z]+-\d+$
      replace: '[$1] '

with this branches

feature/SHOP-1111_foo_bar_baz
feature/SHOP-1111foobarbaz
feature/SHOP-1111123123

None of them matched

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions