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

Handle Git wildmatch edge cases #5

Merged
merged 3 commits into from
Jun 4, 2017
Merged

Handle Git wildmatch edge cases #5

merged 3 commits into from
Jun 4, 2017

Conversation

jdpace
Copy link
Contributor

@jdpace jdpace commented May 24, 2017

This PR copies over some edge case handling from the Python pathspec library (cpburnz/python-pathspec#8) that was introduced after this gem was ported.

The original PR goes into more detail but here's an overview of the edge cases:

  • / does NOT match all paths the repo
  • /abs/path matches: abs/path/foo
  • spam matches: spam/, spam/foo
  • spam/two does NOT match: foo/spam/two
  • spam/** does NOT match: foo/spam/bar
  • left/**/right does NOT match: foo/left/bar/right
  • **/spam does match: foo/spam/, foo/spam/bar
  • foo-*-bar does match: foo-hello-bar/baz
  • ~temp-* does match: ~temp-foo/bar
  • *.py does match: bar.py/baz

@@ -11,6 +11,5 @@ group(:development) do
gem 'ruby-debug'
else
gem 'pry', :require => 'pry'
gem 'pry-debugger'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

pry-debugger was removed since it doesn't work with Ruby 2.X.

@highb
Copy link
Owner

highb commented May 25, 2017

Thanks for submitting this PR! Hm, it looks like something funky is happening in Travis with Ruby 1.8. I'll try checking that out when I have a minute.

@highb
Copy link
Owner

highb commented Jun 4, 2017

I didn't realize Ruby 1.8 was so deprecated now. I've updated the Travis testing to the current stable/maintenance Rubies, so I really don't care about the Ruby 1.8 failure.

Thanks again for putting up this PR! I'll get a new Gem version cut soon.

@highb highb merged commit 750bafe into highb:master Jun 4, 2017
@jdpace jdpace deleted the edge-cases branch June 7, 2017 15:12
@highb highb modified the milestone: 0.1.0 Aug 29, 2017
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