Skip to content

fix: disable brace expansion in gitignore to match git behavior#3331

Open
xingzihai wants to merge 1 commit intoBurntSushi:masterfrom
xingzihai:fix/issue-2830-gitignore-double-brace
Open

fix: disable brace expansion in gitignore to match git behavior#3331
xingzihai wants to merge 1 commit intoBurntSushi:masterfrom
xingzihai:fix/issue-2830-gitignore-double-brace

Conversation

@xingzihai
Copy link
Copy Markdown

This PR fixes issue #2830 by disabling brace expansion in gitignore patterns to match git behavior.\n\n## Changes\n- Disabled brace expansion in gitignore pattern matching\n\nFixes #2830

Git's gitignore does not support brace expansion (e.g., {a,b} is treated
literally, not as an alternation). This commit adds a literal_braces option
to GlobBuilder and enables it in gitignore parsing, fixing patterns like
{{cookiecutter.project_name}} which were previously failing to parse.

Fixes BurntSushi#2830
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 this pull request may close these issues.

1 participant