gitlabhq / grit

Grit gives you object oriented read/write access to Git repositories via Ruby. Patched for GitLab
gitlab.org
MIT License
59 stars 55 forks source link

fix grep while it matches in binary files #39

Open qqshfox opened 10 years ago

qqshfox commented 10 years ago

Sometimes there is no "\n\n" between "Binary file ... matches" and the others.

master:test/dot_git/file-index
874^@test/dot_git/refs/heads/master
875^@test/dot_git/refs/remotes/origin/HEAD
876^@test/dot_git/refs/remotes/origin/master
Binary file master:test/dot_git/index matches
Binary file master:test/dot_git_iv2/index matches
master:test/dot_git_iv2/info/refs
5^@2d3acf90f35989df8f262dc50beadc4ee3ae1560     refs/heads/testing
6^@ca8a30f5a7f0f163bbe3b6f0abf18a6c83b0687a     refs/remotes/origin/HEAD
7^@ca8a30f5a7f0f163bbe3b6f0abf18a6c83b0687a     refs/remotes/origin/master

The gitlab search snapshots:

before

2014-03-07 12 24 07

after

2014-03-07 1 11 24

/cc @jacargentina