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

git secrets --list returns wrong result if there's a branch with name ending with secrets #159

Open
HASHIMOTO-Takafumi opened this issue Apr 6, 2020 · 0 comments · May be fixed by #215

Comments

@HASHIMOTO-Takafumi
Copy link

When there's secrets branch for example, .git/config may contains the following lines:

[branch "secrets"]
        remote = origin
        merge = refs/heads/secrets

If so, git secrets --list returns these config incorrectly:

$ git secrets --list
branch.secrets.remote origin
branch.secrets.merge refs/heads/secrets
...

It seems to be caused by the following regexes:

git-secrets/git-secrets

Lines 340 to 343 in 5e28df3

if [ ${GLOBAL} -eq 1 ]; then
git config --global --get-regex secrets.*
else
git config --get-regex secrets.*

@sparr sparr linked a pull request Jun 16, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant