Skip to content
This repository has been archived by the owner on Apr 19, 2018. It is now read-only.

Grit::Repo.grep returns separated list if --\n is in file context #27

Open
coverer opened this issue Jun 20, 2013 · 0 comments
Open

Grit::Repo.grep returns separated list if --\n is in file context #27

coverer opened this issue Jun 20, 2013 · 0 comments

Comments

@coverer
Copy link

coverer commented Jun 20, 2013

The search of gitlab (and almost every other thing depending on grit) could be improved,
when in lib/grit/repo.rb line 724 would be changed from

722       binary = false
723       file = ''
724        matches = filematch.split("--\n")
725        matches.each_with_index do |match, i|
726          content = []

to use a regexp instead of a string as split parameter

722       binary = false
723       file = ''
724        matches = filematch.split(/^--\n/)
725        matches.each_with_index do |match, i|
726          content = []
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant