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

feat: Support filenames containing # in ignore and remove files #4210

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

twpayne
Copy link
Owner

@twpayne twpayne commented Jan 14, 2025

Fixes #4206.

@twpayne twpayne mentioned this pull request Jan 14, 2025
3 tasks
@twpayne twpayne merged commit 8b42ee8 into master Jan 14, 2025
32 checks passed
@twpayne twpayne deleted the fix-4206 branch January 14, 2025 16:15
@halostatue
Copy link
Collaborator

I was just going to say that this is a good fix, but if you added a second check for ^\\# and stripped the leading \\, we could support files that start with # by doing \#foo. This isn't necessary for any other use of # because of the "beginning or whitespace".

@twpayne
Copy link
Owner Author

twpayne commented Jan 14, 2025

Ah, but then we'd need to start worrying about files whose names begin with a backslash.

@halostatue
Copy link
Collaborator

Ah, but then we'd need to start worrying about files whose names begin with a backslash.

Only if they start with \#, which would be even more rare.

@twpayne
Copy link
Owner Author

twpayne commented Jan 14, 2025

There remains the issue of handling arbitrary filenames, e.g. "this # is a \ filename" is a valid filename. Rather than try to handle all possible cases, I think the current solution is sufficient for now.

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.

How to ignore files containing #
2 participants