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

readme GOTCHA for .gitIgnore scenarios #245

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

Conversation

yuri-scarbaci-lenio
Copy link

Description

#244

Checklist

  • documentation

@yuri-scarbaci-lenio yuri-scarbaci-lenio changed the title readme (GOTCHA for .gitIgnore)[https://github.com/micromatch/micromatch/issues/244] readme GOTCHA for .gitIgnore scenarios Dec 15, 2023
Copy link
Member

@jonschlinkert jonschlinkert left a comment

Choose a reason for hiding this comment

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

Other than the noted changes, this is a great addition and I appreciate the pull request. Once those changes are made I'd be happy to merge. thank you

@@ -122,6 +122,13 @@ console.log(micromatch.isMatch('foo', ['b*', 'f*'])) //=> true

You can mix and match these features to create whatever patterns you need!

## When you SHOULD NOT use micromatch?
Copy link
Member

Choose a reason for hiding this comment

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

Change to "Why NOT use micromatch?" to be consistent with previous title.

@@ -122,6 +122,13 @@ console.log(micromatch.isMatch('foo', ['b*', 'f*'])) //=> true

You can mix and match these features to create whatever patterns you need!

## When you SHOULD NOT use micromatch?
If you are trying to accomplish the same filtering that the `.gitIgnore` `git` does, this library is NOT going to accomplish 1-1 javascript transposition of the matching algorithm.
Copy link
Member

Choose a reason for hiding this comment

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

change gitIgnore to gitignore (all lowercase) to be consistent with Git's casing and conventions: gitignore docs.

## When you SHOULD NOT use micromatch?
If you are trying to accomplish the same filtering that the `.gitIgnore` `git` does, this library is NOT going to accomplish 1-1 javascript transposition of the matching algorithm.

This library is meant to be a functionally drop-in replacement for minimatch and multimatch and neither of them are conforming to https://man7.org/linux/man-pages/man7/glob.7.html.
Copy link
Member

Choose a reason for hiding this comment

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

Remove this line, since the glob(3) linux man page is not a specification or idiomatic reference for .gitignore.

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