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

Do not ignore pattern start with ./ #267

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zanminkian
Copy link

@zanminkian zanminkian commented May 14, 2024

This PR fix 2 issues:

Issue 1: trim gitignore file content

Issue 2: pattern starts with ./ or ./ should not be ignored

foo
├── .gitignore ---> content: ./bar.js
└── bar.js ---> should not be ignored, but actually ignored by globby

@fisker
Copy link
Collaborator

fisker commented May 14, 2024

  • Handle trailing whitespaces:
  • 'a '(one space) should not match 'a '(two spaces).
  • 'a \ ' matches `'a '

Quote from https://github.com/kaelzhang/node-ignore/tree/master?tab=readme-ov-file#why-another-ignore. It seems spaces are useful.

@zanminkian zanminkian changed the title Trim ignore file content and do not ignore pattern start with ./ Do not ignore pattern start with ./ May 15, 2024
@zanminkian
Copy link
Author

I'm not pretty sure about issue 1 so I updated this PR.

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.

None yet

2 participants