Skip to content

Commit

Permalink
ripgrep: don't skip tar archives
Browse files Browse the repository at this point in the history
This removes logic from the decompressor for skipping tar archives. This
logic was originally added under the assumption that we probably want to
avoid the cost of reading them. However, this is generally inconsistent
with how ripgrep treats files like tar archives: it should search them
and do binary detection like normal.

Fixes #918
  • Loading branch information
BurntSushi committed Jul 22, 2018
1 parent 560dffd commit 03af61f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ Bug fixes:
Upgrade `grep` crate to `regex-syntax 0.5.0`.
* [BUG #893](https://github.com/BurntSushi/ripgrep/issues/893):
Improve support for git submodules.
* [BUG #918](https://github.com/BurntSushi/ripgrep/issues/918):
Don't skip tar archives when `-z/--search-zip` is used.
* [BUG #934](https://github.com/BurntSushi/ripgrep/issues/934):
Don't respect gitignore files when searching outside git repositories.
* [BUG #948](https://github.com/BurntSushi/ripgrep/issues/948):
Expand Down
4 changes: 0 additions & 4 deletions src/decompressor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ impl DecompressionReader {
/// If there is any error in spawning the decompression command, then
/// return `None`, after outputting any necessary debug or error messages.
pub fn from_path(path: &Path) -> Option<DecompressionReader> {
if is_tar_archive(path) {
debug!("{}: skipping tar archive", path.display());
return None;
}
let extension = match path.extension().and_then(OsStr::to_str) {
Some(extension) => extension,
None => {
Expand Down

0 comments on commit 03af61f

Please sign in to comment.