gollum / rugged_adapter

Adapter to make gollum use Rugged (libgit2) at the backend.
MIT License
36 stars 27 forks source link

Don't try to grep images #31

Closed dometto closed 5 years ago

dometto commented 5 years ago

Fixes #24

bartkamphorst commented 5 years ago

Makes sense!

dometto commented 5 years ago

Right? Not sure why we didn't do this before. Maybe rugged didn't provide the binary check before. Shall I just merge this?

The binary? (and in RJGit, RawText.is_binary) methods use a heuristic to determine whether a file is likely binary or not. So some files could technically still slip through that don't respond to force_encoding, or otherwise end up causing encoding errors. We could try to rescue those in Wiki#search? Or is it better to let it crash?

bartkamphorst commented 5 years ago

We could try to rescue those in Wiki#search? Or is it better to let it crash?

Rescuing those there seems sensible. 👍

bartkamphorst commented 5 years ago

Shall I just merge this?

Fine by me!

nimag42 commented 5 years ago

Thanks guys :)