Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Finder] Adjust regex to correctly match comments in gitignore contents#33340

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:4.3fromJeroeny:finder-gitignore-regex-43
Sep 16, 2019

Conversation

@Jeroeny
Copy link
Contributor

QA
Branch?4.3
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#32985
LicenseMIT

Description from issue:

When usingignoreVCSIgnored as argument with the Symfony Finder, it will construct a regex equivalent of the gitignore pattern. However it seems that when a comment line (prefixed with#) is present in the.gitignore, the regex used to remove comment lines matches every line and thus returns$gitignoreFileContent as empty.

@Jeroeny
Copy link
ContributorAuthor

Ready to merge or is more review needed?

[
'
/app/cache/
\#EscapedComment
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

What about using a real file name to check that it will be in the list (#file.txt like in a test above)?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

That'd indeed be more useful, I'll change it.

@fabpotfabpotforce-pushed thefinder-gitignore-regex-43 branch from33b2695 toe56fc7cCompareSeptember 16, 2019 11:29
@fabpot
Copy link
Member

Thank you@Jeroeny.

Jeroeny reacted with thumbs up emoji

fabpot added a commit that referenced this pull requestSep 16, 2019
…nore contents (Jeroeny)This PR was squashed before being merged into the 4.3 branch (closes#33340).Discussion----------[Finder] Adjust regex to correctly match comments in gitignore contents| Q             | A| ------------- | ---| Branch?       | 4.3| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#32985| License       | MITDescription from issue:When using `ignoreVCSIgnored`  as argument with the Symfony Finder, it will construct a regex equivalent of the gitignore pattern. However it seems that when a comment line (prefixed with `#`) is present in the `.gitignore`, the regex used to remove comment lines matches every line and thus returns `$gitignoreFileContent` as empty.Commits-------e56fc7c [Finder] Adjust regex to correctly match comments in gitignore contents
@fabpotfabpot merged commite56fc7c intosymfony:4.3Sep 16, 2019
@fabpotfabpot mentioned this pull requestOct 7, 2019
@JeroenyJeroeny deleted the finder-gitignore-regex-43 branchDecember 2, 2019 08:15
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@OskarStarkOskarStarkOskarStark approved these changes

+1 more reviewer

@maxheliasmaxheliasmaxhelias approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

6 participants

@Jeroeny@fabpot@OskarStark@maxhelias@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp