commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
7cf560d27cf2e4ac589e34ab848bf76f6df1bd4d
Daniel Wood
2016-11-03T21:49:48
adding .mak extension for makefile filetype. Fixes #217
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index 027851b..d274b5b 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -123,7 +123,7 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("lisp", &["*.el", "*.jl", "*.lisp", "*.lsp", "*.sc", "*.scm"]), ("lua", &["...
1
1
1
15b263ff550004b9de6cba74286da9834c9ed15a
Daniel Wood
2016-11-03T21:33:00
adding cs filetype for ease of use.
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index 027851b..0f0da6a 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -95,6 +95,7 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ "*.C", "*.cc", "*.cpp", "*.cxx", "*.h", "*.H", "*.hh", "*.hpp", ]...
1
1
0
53121e07338ac60ea0c45274c37b36c4b9077dff
Daniel Wood
2016-11-03T21:30:58
adding .pdf filetype to available types.
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index 027851b..6cf628f 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -135,6 +135,7 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("ocaml", &["*.ml", "*.mli", "*.mll", "*.mly"]), ("org", &["*.org"]), (...
1
1
0
103c4c953c951c1408baf0412f4ce63623b5611f
Lyuha
2016-11-02T14:58:03
Add pod filetype
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index 71c9d33..027851b 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -136,6 +136,7 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("org", &["*.org"]), ("perl", &["*.perl", "*.pl", "*.PL", "*.plh", "*.plx", ...
1
1
0
82abf883c536560e62b56489e1af7709056b08f6
Lyuha
2016-11-02T14:28:48
Add wiki filetype
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index 1ae2d8f..71c9d33 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -159,6 +159,7 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("vala", &["*.vala"]), ("vb", &["*.vb"]), ("vimscript", &["*.vim"]), + ...
1
1
0
a2315d5ee5d26166181be389e04cbb406706a674
Lyuha
2016-11-02T14:27:11
Add creole filetype
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index 2c0aa97..1ae2d8f 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -89,6 +89,7 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("clojure", &["*.clj", "*.cljc", "*.cljs", "*.cljx"]), ("cmake", &["*.cmake", ...
1
1
0
201d0cb8c158b07cb2ffe1bcb403e011a4263cd6
Lyuha
2016-11-02T14:22:09
Add org filetype
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index 7c7111f..2c0aa97 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -132,6 +132,7 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("objc", &["*.h", "*.m"]), ("objcpp", &["*.h", "*.mm"]), ("ocaml", &["*...
1
1
0
6f45478a7db0856971c1b62b069f06b40e91df2e
Lyuha
2016-11-02T14:15:43
Add rdoc filetype
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index 23e5e99..7c7111f 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -137,6 +137,7 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("py", &["*.py"]), ("readme", &["README*", "*README"]), ("r", &["*.R", ...
1
1
0
9c2c5696242f963542406a4c89955c6cd1e061a9
Lyuha
2016-11-02T14:08:10
Add textile filetype
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index 3d15f9c..23e5e99 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -149,6 +149,7 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("taskpaper", &["*.taskpaper"]), ("tcl", &["*.tcl"]), ("tex", &["*.tex"...
1
1
0
caf31a769b9b498c293b80aa9914329b7e1a58ee
tjdgus3537
2016-11-02T13:50:59
Add .markdown, .mdown, .mkdn extension to md and markdown
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index 289821c..3d15f9c 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -123,8 +123,8 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("lua", &["*.lua"]), ("m4", &["*.ac", "*.m4"]), ("make", &["gnumakefile...
1
2
2
920112e6404fdc3c8915ffab89e5caf1099b8bf5
tjdgus3537
2016-11-02T13:49:31
Add .adoc, .asc, asciidoc extension to asciidoc
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index ed6e0d6..289821c 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -81,6 +81,7 @@ use {Error, Match}; const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("agda", &["*.agda", "*.lagda"]), + ("asciidoc", &["*.ado...
1
1
0
65c7df1c253ba10e0f4f7c7c5fcfab788bb95b4c
Neil Grogan
2016-11-01T13:59:59
Added taskpaper as a file type
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index 1ebadaf..ed6e0d6 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -145,6 +145,7 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("sql", &["*.sql"]), ("sv", &["*.v", "*.vg", "*.sv", "*.svh", "*.h"]), ...
1
1
0
18237da9b2a0139f7e2bf9f384f5a8a939104e8c
Alexander Altman
2016-11-01T10:56:53
Add Agda and improve TeX ignore support (#207) Add Agda and improve TeX ignore support
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index dade000..1ebadaf 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -80,6 +80,7 @@ use pathutil::file_name; use {Error, Match}; const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ + ("agda", &["*.agda", "*.lagda"]), ...
1
2
1
d85a6dd5c8b9f5d3e8c4bf3d6207ac9a29717d6c
Andrew Gallant
2016-11-01T00:01:17
update ignore dependency
diff --git a/Cargo.lock b/Cargo.lock index c475095..7bf1de7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7,7 +7,7 @@ dependencies = [ "docopt 0.6.86 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "grep 0.1.3", - "ignore 0.1.1",...
2
3
3
40abade8eec17332d5085f1a23786f0969d4a3a1
Andrew Gallant
2016-10-31T23:54:47
ignore-0.1.3
diff --git a/ignore/Cargo.toml b/ignore/Cargo.toml index 588ca63..1d33644 100644 --- a/ignore/Cargo.toml +++ b/ignore/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ignore" -version = "0.1.2" #:version +version = "0.1.3" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = """ A fast library fo...
1
1
1
fca4fdf6eae7e4f37e20371e0bd02c337ec594a5
Andrew Gallant
2016-10-31T23:53:47
ignore-0.1.2
diff --git a/ignore/Cargo.toml b/ignore/Cargo.toml index 7d69dfa..588ca63 100644 --- a/ignore/Cargo.toml +++ b/ignore/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ignore" -version = "0.1.1" #:version +version = "0.1.2" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = """ A fast library fo...
1
1
1
16975797feb297ed0e8022117723c71cd6013f4f
Andrew Gallant
2016-10-31T23:53:25
Fixes a matching bug in the glob override matcher. This was probably a transcription error when moving the ignore matcher code out of ripgrep core. Specifically, the override glob matcher should not ignore directories if they don't match. Fixes #206
diff --git a/ignore/src/overrides.rs b/ignore/src/overrides.rs index c53a50f..c737b04 100644 --- a/ignore/src/overrides.rs +++ b/ignore/src/overrides.rs @@ -79,8 +79,9 @@ impl Override { /// /// If there are no overrides, then this always returns `Match::None`. /// - /// If there is at least one white...
2
29
4
c8e2fa1869becb0c8e9e7a386ca8c6ceb988deb2
Andrew Gallant
2016-10-31T23:44:25
update Cargo.lock
diff --git a/Cargo.lock b/Cargo.lock index 686c4f0..c475095 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ [root] name = "ripgrep" -version = "0.2.3" +version = "0.2.5" dependencies = [ "ctrlc 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "deque 0.3.1 (registry+https://github.com/rust...
1
1
1
c302995d05be10371d771b021de55a7a92f55261
Lyuha
2016-10-30T15:52:45
Add .fish extension to fish shell
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index 8f4cd17..dade000 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -99,6 +99,7 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("d", &["*.d"]), ("elisp", &["*.el"]), ("erlang", &["*.erl", "*.hrl"]), +...
1
1
0
1aae2759ad8c7cc8fce4c0a4845aafdeb0feef7b
Andrew Gallant
2016-10-30T02:27:29
update deps
diff --git a/Cargo.lock b/Cargo.lock index faef74a..686c4f0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7,7 +7,7 @@ dependencies = [ "docopt 0.6.86 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "grep 0.1.3", - "ignore 0.1.0",...
1
40
5
91646f6cca69adc2815b4ab927901fb04e7c6f73
Andrew Gallant
2016-10-30T02:19:00
bump ignore to 0.1.1
diff --git a/Cargo.toml b/Cargo.toml index 57b3205..d0cb931 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ deque = "0.3" docopt = "0.6" env_logger = "0.3" grep = { version = "0.1.3", path = "grep" } -ignore = { version = "0.1.0", path = "ignore" } +ignore = { version = "0.1.1", path = "ignore" } lazy_st...
1
1
1
031ace209dd75cd9a24b04562ea00665606d3131
Andrew Gallant
2016-10-30T02:17:39
ignore-0.1.1
diff --git a/ignore/Cargo.toml b/ignore/Cargo.toml index 1614e66..7d69dfa 100644 --- a/ignore/Cargo.toml +++ b/ignore/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ignore" -version = "0.1.0" #:version +version = "0.1.1" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = """ A fast library fo...
1
1
1
942e9c47434726c4e84544b0e52eda077ec7eae1
Andrew Gallant
2016-10-30T02:17:27
don't commit ignore/Cargo.lock
diff --git a/ignore/Cargo.lock b/ignore/Cargo.lock deleted file mode 100644 index 7046ecd..0000000 --- a/ignore/Cargo.lock +++ /dev/null @@ -1,170 +0,0 @@ -[root] -name = "ignore" -version = "0.1.0" -dependencies = [ - "globset 0.1.0", - "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lo...
1
0
170
12c9656b186ca43b7bfcffce8a38d05509991e9b
Andrew Gallant
2016-10-30T02:15:24
bump thread_local
diff --git a/ignore/Cargo.toml b/ignore/Cargo.toml index 9ca0fca..1614e66 100644 --- a/ignore/Cargo.toml +++ b/ignore/Cargo.toml @@ -23,7 +23,7 @@ lazy_static = "0.2" log = "0.3" memchr = "0.1" regex = "0.1.77" -thread_local = "0.2.7" +thread_local = "0.3.0" walkdir = "1" [dev-dependencies]
1
1
1
8bf3760cdb863033d3c84b51374686dcdd2b8d73
Andrew Gallant
2016-10-30T02:13:41
ignore-0.1.0
diff --git a/ignore/Cargo.toml b/ignore/Cargo.toml index 20b150f..9ca0fca 100644 --- a/ignore/Cargo.toml +++ b/ignore/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ignore" -version = "0.0.1" #:version +version = "0.1.0" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = """ A fast library fo...
1
1
1
c96623e66a1faffd7ae6cadfa6dbb43c077d2c31
Andrew Gallant
2016-10-30T02:13:32
bump globset dep in ignore
diff --git a/ignore/Cargo.toml b/ignore/Cargo.toml index 520f9cf..20b150f 100644 --- a/ignore/Cargo.toml +++ b/ignore/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ignore" -version = "0.1.0" #:version +version = "0.0.1" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = """ A fast library fo...
1
2
2
36f949633bf7f352bf637ac6bc85bbc7555c4b32
Andrew Gallant
2016-10-30T02:12:44
globset-0.1.1
diff --git a/globset/Cargo.toml b/globset/Cargo.toml index b302d9c..82d01a3 100644 --- a/globset/Cargo.toml +++ b/globset/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "globset" -version = "0.1.0" #:version +version = "0.1.1" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = """ Cross platfo...
1
1
1
79a8d0ab3f75be2d30a8c55ae97dfd858e583be8
Brian Campbell
2016-10-19T03:37:49
Reset the terminal when Ctrl-C is pressed If a user hits Ctrl-C to exit out of a search in the middle of printing a line, we don't want to leave the terminal colors screwed up for them. Catch Ctrl-C using the ctrlc crate, obtain a stdout lock to ensure that other threads don't continue writing after we do so, reset th...
diff --git a/Cargo.lock b/Cargo.lock index b10e060..faef74a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,7 @@ name = "ripgrep" version = "0.2.3" dependencies = [ + "ctrlc 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ...
3
27
0
3aaf550ca5451497f04deda5d723af9c59108c99
Tim Sampson
2016-10-28T06:24:21
update python types to include Cython files
diff --git a/src/types.rs b/src/types.rs index b49e9df..7c33a48 100644 --- a/src/types.rs +++ b/src/types.rs @@ -65,7 +65,7 @@ const TYPE_EXTENSIONS: &'static [(&'static str, &'static [&'static str])] = &[ ("ocaml", &["*.ml", "*.mli", "*.mll", "*.mly"]), ("perl", &["*.perl", "*.pl", "*.PL", "*.plh", "*.plx", ...
1
1
1
867a57e176c4c92d7672a94ce555003aed10453f
simbekkh
2016-10-27T15:34:49
Add zsh type
diff --git a/src/types.rs b/src/types.rs index 3133c03..b49e9df 100644 --- a/src/types.rs +++ b/src/types.rs @@ -88,6 +88,7 @@ const TYPE_EXTENSIONS: &'static [(&'static str, &'static [&'static str])] = &[ ("xml", &["*.xml"]), ("yacc", &["*.y"]), ("yaml", &["*.yaml", "*.yml"]), + ("zsh", &["*.zsh", "....
1
1
0
f2e1711781d245eca7bc9087fc833cf59af98a0b
Andrew Gallant
2016-10-16T14:15:11
Fix bug when processing parent gitignore files. This particular bug was triggered whenever a search was run in a directory with a parent directory that contains a relevant .gitignore file. In particular, before matching against a parent directory's gitignore rules, a path's leading `./` was not stripped, which results...
diff --git a/src/ignore.rs b/src/ignore.rs index d24909c..a8cbac1 100644 --- a/src/ignore.rs +++ b/src/ignore.rs @@ -20,7 +20,7 @@ use std::io; use std::path::{Path, PathBuf}; use gitignore::{self, Gitignore, GitignoreBuilder, Match, Pattern}; -use pathutil::{file_name, is_hidden}; +use pathutil::{file_name, is_hid...
2
19
2
94d600e6e160c817176c48a07cb8ac1d29c553d7
Andrew Gallant
2016-10-16T14:12:49
Update deps.
diff --git a/Cargo.lock b/Cargo.lock index a59b641..ba88e2c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ [root] name = "ripgrep" -version = "0.2.2" +version = "0.2.3" dependencies = [ "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "docopt 0.6.86 (registry+https://github.com/ru...
1
10
10
f04b0dd95c921b64e489fb13e639c635725fd9f0
Corentin Henry
2016-10-13T18:28:34
add .tcl file extension
diff --git a/src/types.rs b/src/types.rs index cefecdc..3133c03 100644 --- a/src/types.rs +++ b/src/types.rs @@ -77,6 +77,7 @@ const TYPE_EXTENSIONS: &'static [(&'static str, &'static [&'static str])] = &[ ("sql", &["*.sql"]), ("sv", &["*.v", "*.vg", "*.sv", "*.svh", "*.h"]), ("swift", &["*.swift"]), + ...
1
1
0
1fc6787648a0b97486c3b79857e3ac28e266c343
Alex LaFroscia
2016-10-13T00:08:24
Shorten name of Handlebars type
diff --git a/src/types.rs b/src/types.rs index 6ee3f2d..cefecdc 100644 --- a/src/types.rs +++ b/src/types.rs @@ -40,7 +40,7 @@ const TYPE_EXTENSIONS: &'static [(&'static str, &'static [&'static str])] = &[ ("fsharp", &["*.fs", "*.fsx", "*.fsi"]), ("go", &["*.go"]), ("groovy", &["*.groovy", "*.gradle"]), ...
1
1
1
11e164aec914c9471ecebdb202048502a1620dc2
Alex LaFroscia
2016-10-13T00:07:04
Add `handlebars` type
diff --git a/src/types.rs b/src/types.rs index b87e01a..6ee3f2d 100644 --- a/src/types.rs +++ b/src/types.rs @@ -40,6 +40,7 @@ const TYPE_EXTENSIONS: &'static [(&'static str, &'static [&'static str])] = &[ ("fsharp", &["*.fs", "*.fsx", "*.fsi"]), ("go", &["*.go"]), ("groovy", &["*.groovy", "*.gradle"]), ...
1
1
0
cbe94823d2be91c396e7d27b3cf827f66404460c
Steven Fackler
2016-10-12T18:07:27
Add .gradle as a groovy extension pattern Gradle is a build system for JVM-based languages that is configured via a Groovy DSL.
diff --git a/src/types.rs b/src/types.rs index 6951712..b87e01a 100644 --- a/src/types.rs +++ b/src/types.rs @@ -39,7 +39,7 @@ const TYPE_EXTENSIONS: &'static [(&'static str, &'static [&'static str])] = &[ ]), ("fsharp", &["*.fs", "*.fsx", "*.fsi"]), ("go", &["*.go"]), - ("groovy", &["*.groovy"]), + ...
1
1
1
247a9398f4dd1903ed561aa1bb2ba088a70c5a79
Andrew Gallant
2016-10-11T22:23:49
Switch to thread_local crate in lieu of thread_local!. This is to work around a bug where using a thread_local! was causing a segfault on macos. Fixes #164.
diff --git a/Cargo.lock b/Cargo.lock index f1932c8..a59b641 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ [root] name = "ripgrep" -version = "0.2.1" +version = "0.2.2" dependencies = [ "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "docopt 0.6.86 (registry+https://github.com/ru...
4
22
21
51440f59cdaeab4a74e7c6329977a0595d49696a
Andrew Gallant
2016-10-11T02:24:28
Don't include HomebrewFormula in crate.
diff --git a/Cargo.toml b/Cargo.toml index 521cdad..a8e8204 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,7 @@ repository = "https://github.com/BurntSushi/ripgrep" readme = "README.md" keywords = ["regex", "grep", "egrep", "search", "pattern"] license = "Unlicense/MIT" +exclude = ["HomebrewFormula"] [[bin...
1
1
0
4737326ed3e0d0a328dafcce9b8d4375ff142460
Andrew Gallant
2016-10-11T02:04:29
Update regex-syntax for bug fix. The bug fix was in expression pretty printing. ripgrep parses the regex into an AST and may do some modifications to it, which requires the ability to go from string -> AST -> string' -> AST' where string == string' implies AST == AST'. Also, add a regression test for the specific reg...
diff --git a/Cargo.lock b/Cargo.lock index 6083716..f1932c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -92,7 +92,7 @@ dependencies = [ "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "memmap 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.1.77 (registry+https://g...
2
32
4
a3537aa32a9069c0d740931010de32f0f184583f
Andrew Gallant
2016-10-11T01:48:47
Update darwin cfg attributes.
diff --git a/src/args.rs b/src/args.rs index 40fe97f..95bd510 100644 --- a/src/args.rs +++ b/src/args.rs @@ -334,7 +334,7 @@ impl RawArgs { } else if cfg!(windows) { // On Windows, memory maps appear faster than read calls. Neat. true - } else if cfg!(darwin) { ...
2
2
2
d3e118a786971ac2e1d8f62e22dce7fa60fc3ce3
Andrew Gallant
2016-10-11T01:48:34
Fix debug expression statement.
diff --git a/grep/src/search.rs b/grep/src/search.rs index a91e5e4..c763993 100644 --- a/grep/src/search.rs +++ b/grep/src/search.rs @@ -184,8 +184,9 @@ impl GrepBuilder { .unicode(true) .case_insensitive(self.opts.case_insensitive) .parse(&self.pattern)); + ...
1
2
1
4e52059ad652f08c5e378438207386b23b16e58c
Andrew Gallant
2016-10-11T01:03:11
Disable regression_131 test on darwin. It's not clear why it's failing. Maybe it doesn't permit certain characters in file paths?
diff --git a/tests/tests.rs b/tests/tests.rs index f78feb7..60edb74 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -776,6 +776,9 @@ clean!(regression_127, "Sherlock", ".", |wd: WorkDir, mut cmd: Command| { }); // See: https://github.com/BurntSushi/ripgrep/issues/131 +// +// TODO(burntsushi): Darwin doesn't lik...
1
3
0
60c016c24353635193e5e3ea1645a3485f59b21f
Andrew Gallant
2016-10-11T00:49:39
Fix docopt usage string. Gah.
diff --git a/src/args.rs b/src/args.rs index ba6235f..40fe97f 100644 --- a/src/args.rs +++ b/src/args.rs @@ -199,12 +199,12 @@ File type management options: --type-add ARG ... Add a new glob for a particular file type. Only one glob can be - added at a time. Multiple --type-add flags can be provi...
1
5
5
dde5bd5a809e3a606b0cfe5e8500586baadc1d29
Andrew Gallant
2016-10-11T00:07:13
globset-0.1.0
diff --git a/globset/Cargo.toml b/globset/Cargo.toml index 1106d92..a885ea1 100644 --- a/globset/Cargo.toml +++ b/globset/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "globset" -version = "0.0.1" #:version +version = "0.1.0" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = """ Cross platfo...
1
1
1
762ad44f71ae5934340326510c579d15bada09aa
Andrew Gallant
2016-10-11T00:03:08
add version marker
diff --git a/globset/Cargo.toml b/globset/Cargo.toml index f089325..1106d92 100644 --- a/globset/Cargo.toml +++ b/globset/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "globset" -version = "0.1.0" +version = "0.0.1" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = """ Cross platform single g...
1
2
2
705386934dc9ffe2302bb6924fed6d0211ef2085
Andrew Gallant
2016-10-10T23:50:21
Fill in globset/Cargo.toml with more details.
diff --git a/globset/Cargo.toml b/globset/Cargo.toml index 67a954d..f089325 100644 --- a/globset/Cargo.toml +++ b/globset/Cargo.toml @@ -2,6 +2,17 @@ name = "globset" version = "0.1.0" authors = ["Andrew Gallant <jamslam@gmail.com>"] +description = """ +Cross platform single glob and glob set matching. Glob set matc...
1
11
0
27a980c1bc0fb424d41803714c3a9041b4a5d830
Andrew Gallant
2016-10-10T23:34:57
Fix symlink test. We attempt to run it on Windows, but I'm getting "access denied" errors when trying to create a file symlink. So we disable the test on Windows.
diff --git a/tests/tests.rs b/tests/tests.rs index 965d37a..f78feb7 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -542,7 +542,7 @@ sherlock!(symlink_nofollow, "Sherlock", ".", |wd: WorkDir, mut cmd: Command| { wd.remove("sherlock"); wd.create_dir("foo"); wd.create_dir("foo/bar"); - wd.link("foo/...
2
38
6
e8645dc8aee910c9ce4b181afeb4ab9ad016670b
Andrew Gallant
2016-10-10T23:27:12
style nits
diff --git a/src/args.rs b/src/args.rs index 365749d..6ee30e7 100644 --- a/src/args.rs +++ b/src/args.rs @@ -709,8 +709,8 @@ impl Args { /// Create a new recursive directory iterator at the path given. pub fn walker(&self, path: &Path) -> Result<walk::Iter> { // Always follow symlinks for explicitly ...
2
22
21
1c964372ad7cfb70116101480638e39a0d07d762
Ian Kerins
2016-10-09T02:40:03
Always follow symlinks on explicit file arguments.
diff --git a/src/args.rs b/src/args.rs index 6cca125..365749d 100644 --- a/src/args.rs +++ b/src/args.rs @@ -708,7 +708,9 @@ impl Args { /// Create a new recursive directory iterator at the path given. pub fn walker(&self, path: &Path) -> Result<walk::Iter> { - let mut wd = WalkDir::new(path).follow_...
2
22
1
50a961960e4ac6983cfadbda627a54fc3b97aa1c
Daniel Wood
2016-10-07T20:37:29
added extra .md filetype for ease of access
diff --git a/src/types.rs b/src/types.rs index af2a857..e616100 100644 --- a/src/types.rs +++ b/src/types.rs @@ -53,6 +53,7 @@ const TYPE_EXTENSIONS: &'static [(&'static str, &'static [&'static str])] = &[ ("m4", &["*.ac", "*.m4"]), ("make", &["gnumakefile", "Gnumakefile", "makefile", "Makefile", "*.mk"]), ...
1
1
0
7481c5fe2995fb5d4dedcdc74177002338a7fa25
Daniel Wood
2016-10-07T20:35:20
added .spark filetype
diff --git a/src/types.rs b/src/types.rs index af2a857..63a7309 100644 --- a/src/types.rs +++ b/src/types.rs @@ -70,6 +70,7 @@ const TYPE_EXTENSIONS: &'static [(&'static str, &'static [&'static str])] = &[ ("rust", &["*.rs"]), ("scala", &["*.scala"]), ("sh", &["*.bash", "*.csh", "*.ksh", "*.sh", "*.tcsh"...
1
1
0
3ae37b09374f8759a9c87d9606b35f70fd080b13
Daniel Wood
2016-10-07T19:50:26
added .config filetype
diff --git a/src/types.rs b/src/types.rs index af2a857..dfbeb2d 100644 --- a/src/types.rs +++ b/src/types.rs @@ -21,6 +21,7 @@ const TYPE_EXTENSIONS: &'static [(&'static str, &'static [&'static str])] = &[ ("clojure", &["*.clj", "*.cljc", "*.cljs", "*.cljx"]), ("cmake", &["*.cmake", "CMakeLists.txt"]), (...
1
1
0
f0053682c02d0b6fc8d90b6c4f2dd03cce200b35
Samuel Colvin
2016-10-04T12:02:26
add jinja type for *.jinja and *.jinja2
diff --git a/src/types.rs b/src/types.rs index e5dea7d..90b8339 100644 --- a/src/types.rs +++ b/src/types.rs @@ -42,6 +42,7 @@ const TYPE_EXTENSIONS: &'static [(&'static str, &'static [&'static str])] = &[ ("haskell", &["*.hs", "*.lhs"]), ("html", &["*.htm", "*.html"]), ("java", &["*.java"]), + ("jinj...
1
1
0
703d5b558efa65054f3b918b5723a3549c7291d2
Cameron Hart
2016-10-04T00:28:49
Added *.cmake extension to cmake file type.
diff --git a/src/types.rs b/src/types.rs index 362d0f0..e5dea7d 100644 --- a/src/types.rs +++ b/src/types.rs @@ -19,7 +19,7 @@ const TYPE_EXTENSIONS: &'static [(&'static str, &'static [&'static str])] = &[ ("c", &["*.c", "*.h", "*.H"]), ("cbor", &["*.cbor"]), ("clojure", &["*.clj", "*.cljc", "*.cljs", "*...
1
1
1
b9d5f22a4d20862dfbcbdfc81a07284719cc71c4
Andrew Gallant
2016-09-30T23:29:52
Stopgap measure for projects with huge gitignore files. This helps #134 by avoiding a slow regex execution path, but doesn't actually fix the problem. Namely, we've gone from "so slow I'm not going to keep waiting for rg to finish" to "wow that was slow but at least it finished before I lost my patience."
diff --git a/src/glob.rs b/src/glob.rs index 52691af..295474c 100644 --- a/src/glob.rs +++ b/src/glob.rs @@ -39,7 +39,6 @@ use std::str; use fnv; use regex; use regex::bytes::Regex; -use regex::bytes::RegexSet; use pathutil::file_name; @@ -138,7 +137,6 @@ type Fnv = hash::BuildHasherDefault<fnv::FnvHasher>; //...
1
18
20
46dff8f4becc9007b073a1f3f412d6a1a544440c
Andrew Gallant
2016-09-29T00:50:50
Be better with short circuiting with --quiet. It didn't make sense for --quiet to be part of the printer, because --quiet doesn't just mean "don't print," it also means, "stop after the first match is found." This needs to be wired all the way up through directory traversal, and it also needs to cause all of the searc...
diff --git a/src/args.rs b/src/args.rs index 5cfb14a..73675ff 100644 --- a/src/args.rs +++ b/src/args.rs @@ -571,6 +571,11 @@ impl Args { self.mmap } + /// Whether ripgrep should be quiet or not. + pub fn quiet(&self) -> bool { + self.quiet + } + /// Create a new printer of individu...
5
82
33
316ffd87b3b521ecea555b80042ff5182eca5e6f
Andrew Gallant
2016-09-28T19:56:59
bump docopt to 0.6.86
diff --git a/Cargo.lock b/Cargo.lock index 9a12c1d..12f5b17 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,7 +3,7 @@ name = "ripgrep" version = "0.2.1" dependencies = [ "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "docopt 0.6.85 (registry+https://github.com/rust-lang/crates.io-index)", +...
1
3
3
5943b1effe8e11d265dad52a27e69fcc1bf8484d
依云
2016-09-28T03:17:45
if --color always, always print with color, even when --vimgrep is given
diff --git a/src/args.rs b/src/args.rs index 0f49e53..3b27ddc 100644 --- a/src/args.rs +++ b/src/args.rs @@ -355,12 +355,14 @@ impl RawArgs { self.flag_threads }; let color = - if self.flag_vimgrep { + if self.flag_color == "always" { + true + ...
1
4
2
0d9bba781661815a6c84590107dcc8e18461e323
依云
2016-09-28T03:54:43
colorize filepath at the beginning of line too
diff --git a/src/printer.rs b/src/printer.rs index 21845be..1184883 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -274,12 +274,7 @@ impl<W: Terminal + Send> Printer<W> { self.write_file_sep(); self.write_heading(path.as_ref()); } else if !self.heading && self.with_filename { - ...
1
17
6
b3935935cb5228e480e483844f86f3b94e093bfa
cetra3
2016-09-26T02:42:46
Add colour choice
diff --git a/src/printer.rs b/src/printer.rs index 84a72fb..4b20a1a 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -37,6 +37,36 @@ pub struct Printer<W> { replace: Option<Vec<u8>>, /// Whether to prefix each match with the corresponding file name. with_filename: bool, + + /// The choice of Colour...
1
34
3
3e78fce3a3ca226dde4e332a30bf24fad03f8f35
Andrew Gallant
2016-09-26T23:57:23
Don't print empty lines in single threaded mode. Fixes #99.
diff --git a/src/main.rs b/src/main.rs index 74326e1..b095f00 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,7 +22,7 @@ extern crate winapi; use std::error::Error; use std::fs::File; -use std::io::{self, Write}; +use std::io; use std::path::Path; use std::process; use std::result; @@ -157,31 +157,28 @@ fn run...
4
51
14
d30640344090fc3ffde6d58e0c5a4c928fb00990
Andrew Gallant
2016-09-26T23:09:59
Fix an off-by-one error with --column. Fixes #105.
diff --git a/src/printer.rs b/src/printer.rs index 84a72fb..0645b7e 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -186,7 +186,7 @@ impl<W: Terminal + Send> Printer<W> { let column = if self.column { Some(re.find(&buf[start..end]) - .map(...
2
21
3
f27aa3ff6fcff9adfa312d8d404254419f90c029
Andrew Gallant
2016-09-26T22:55:26
Add regression test. Fixes #106.
diff --git a/src/gitignore.rs b/src/gitignore.rs index c4f46fa..bfc8384 100644 --- a/src/gitignore.rs +++ b/src/gitignore.rs @@ -429,4 +429,10 @@ mod tests { not_ignored!(ignot11, ROOT, "#foo", "#foo"); not_ignored!(ignot12, ROOT, "\n\n\n", "foo"); not_ignored!(ignot13, ROOT, "foo/**", "foo", true); + + ...
1
6
0
20ccd441f2d6000100bbbbade37aeca492d55ee0
Tom Jackson
2016-09-26T16:34:32
Allow (and ignore) whitespace-only lines in .gitignore files Git considers these to be blank lines.
diff --git a/src/gitignore.rs b/src/gitignore.rs index e05dc58..c4f46fa 100644 --- a/src/gitignore.rs +++ b/src/gitignore.rs @@ -283,12 +283,15 @@ impl GitignoreBuilder { from: P, mut line: &str, ) -> Result<(), Error> { - if line.is_empty() || line.starts_with("#") { + if line.star...
1
4
1
104d740f769256ee6beeaef5a0d1c245947c0ce9
Andrew Gallant
2016-09-26T22:44:00
Don't quit if opening a file fails. This was already working correctly in multithreaded mode, but in single threaded mode, a file failing to open caused search to stop. That's bad. Fixes #98.
diff --git a/src/main.rs b/src/main.rs index 7a40c07..74326e1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -23,7 +23,7 @@ extern crate winapi; use std::error::Error; use std::fs::File; use std::io::{self, Write}; -use std::path::{Path, PathBuf}; +use std::path::Path; use std::process; use std::result; use std::s...
1
11
37
2da0eab2b809b7633f13c7bf3eff28be970d4db6
Andrew Gallant
2016-09-26T22:43:15
Don't initialize ignores for file arguments. We'll never use them, so it's wasted effort.
diff --git a/src/args.rs b/src/args.rs index 4245871..8af34a3 100644 --- a/src/args.rs +++ b/src/args.rs @@ -673,15 +673,20 @@ impl Args { pub fn walker(&self, path: &Path) -> Result<walk::Iter> { let wd = WalkDir::new(path).follow_links(self.follow); let mut ig = Ignore::new(); - ig.ignor...
1
14
9
ec269956554cbed8e283e9b6ef21d3b02f054db9
Kaushal Modi
2016-09-26T19:24:35
Add SystemVerilog (SV) type
diff --git a/src/types.rs b/src/types.rs index 4de6573..2b60bcb 100644 --- a/src/types.rs +++ b/src/types.rs @@ -70,6 +70,7 @@ const TYPE_EXTENSIONS: &'static [(&'static str, &'static [&'static str])] = &[ ("scala", &["*.scala"]), ("sh", &["*.bash", "*.csh", "*.ksh", "*.sh", "*.tcsh"]), ("sql", &["*.sql"...
1
1
0
1a91b900e7d2345d3906861437d114e1814c0ae6
Emlyn Corrin
2016-09-26T08:53:46
Clojure files can also end in cljc or cljx (see https://github.com/clojure/clojurescript/wiki/Using-cljc)
diff --git a/src/types.rs b/src/types.rs index 7f279d4..4de6573 100644 --- a/src/types.rs +++ b/src/types.rs @@ -18,7 +18,7 @@ const TYPE_EXTENSIONS: &'static [(&'static str, &'static [&'static str])] = &[ ("awk", &["*.awk"]), ("c", &["*.c", "*.h", "*.H"]), ("cbor", &["*.cbor"]), - ("clojure", &["*.cl...
1
1
1
109bc3f78e0bf1fe0e40a22e458621e86e49b761
Andrew Gallant
2016-09-26T02:30:17
bump grep to 0.1.3
diff --git a/Cargo.lock b/Cargo.lock index 4b47998..8624c50 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7,7 +7,7 @@ dependencies = [ "env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://gith...
2
3
3
b62195b33f5869bba2cf6e1a08d2975d6e4acf48
Andrew Gallant
2016-09-26T02:29:35
grep 0.1.3
diff --git a/grep/Cargo.toml b/grep/Cargo.toml index a2d7307..d14ba88 100644 --- a/grep/Cargo.toml +++ b/grep/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "grep" -version = "0.1.2" #:version +version = "0.1.3" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = """ Fast line oriented regex se...
1
1
1
19e405e5c5681496d2ff90727d4043b01129f920
Andrew Gallant
2016-09-26T01:48:01
fix windows
diff --git a/src/printer.rs b/src/printer.rs index 07b6e31..84a72fb 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -308,7 +308,7 @@ impl<W: Terminal + Send> Printer<W> { } #[cfg(not(unix))] - fn write_path<P: AsRef<Path>>(&mut self, p: P) { + fn write_path<P: AsRef<Path>>(&mut self, path: P) { ...
1
1
1
f85822266ff8121cc2f7a64ea5428c673bd69de2
Andrew Gallant
2016-09-26T01:27:17
Don't use an intermediate buffer when --threads=1. Fixes #8
diff --git a/src/args.rs b/src/args.rs index 48c9187..4245871 100644 --- a/src/args.rs +++ b/src/args.rs @@ -564,12 +564,21 @@ impl Args { /// to the writer given. pub fn out(&self) -> Out { let mut out = Out::new(self.color); + if let Some(filesep) = self.file_separator() { + out =...
3
121
5
b034b777984ab0eeeafd82119e75c60a80254b5d
Andrew Gallant
2016-09-26T01:26:49
Don't replace NUL bytes when searching binary files as text. This was a result of misinterpreting a feature in grep where NUL bytes are replaced with \n. The primary reason for doing this is to avoid excessive memory usage on truly binary data. However, grep only does this when searching binary files as if they were b...
diff --git a/src/search_stream.rs b/src/search_stream.rs index 0b5bfaf..3407366 100644 --- a/src/search_stream.rs +++ b/src/search_stream.rs @@ -532,10 +532,6 @@ impl InputBuffer { if self.first && is_binary(&self.buf[self.end..self.end + n]) { self.is_binary = true; } - ...
2
9
8
278e1168bf11c62faff18f0857b151dcef65dee4
Andrew Gallant
2016-09-26T01:23:26
Make printing paths a bit faster. It seems silly, but on *nix, we can just dump the bytes of the path straight to the terminal. There's no need to do a UTF-8 check, which can be costly when printing lots of matches.
diff --git a/src/printer.rs b/src/printer.rs index a690eaa..07b6e31 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -145,14 +145,14 @@ impl<W: Terminal + Send> Printer<W> { /// Prints the given path. pub fn path<P: AsRef<Path>>(&mut self, path: P) { let path = strip_prefix("./", path.as_ref()).un...
1
19
6
6a8051b258408343c4cf164acdc4cc2cd7928129
Andrew Gallant
2016-09-26T00:10:28
Don't union inner literals of repetitions. If we do, this results in extracting `foofoofoo` from `(\wfoo){3}`, which is wrong. This does prevent us from extracting `foofoofoo` from `foo{3}`, which is unfortunate, but we miss plenty of other stuff too. Literal extracting needs a good rethink (all the way down into the ...
diff --git a/grep/src/literals.rs b/grep/src/literals.rs index f168527..4cd34a8 100644 --- a/grep/src/literals.rs +++ b/grep/src/literals.rs @@ -8,7 +8,6 @@ Note that this implementation is incredibly suspicious. We need something more principled. */ use std::cmp; -use std::iter; use regex::bytes::Regex; use syn...
2
15
5
a13ac3e3d49729403a734c9f3eab2d99a66e21b0
Andrew Gallant
2016-09-26T00:00:07
On Windows, always consider stdin to be a tty. This means that `rg pat < file` won't do the expected thing and search `fil`. Instead, it will recursively search the current directory for `pat`. This isn't ideal, but is better than the previous behavior, which was to wait for stdin when running `rg pat`, given the appe...
diff --git a/src/atty.rs b/src/atty.rs index 0e95409..978c374 100644 --- a/src/atty.rs +++ b/src/atty.rs @@ -27,30 +27,35 @@ pub fn stdin_is_readable() -> bool { true } +/// Returns true if there is a tty on stdin. #[cfg(unix)] pub fn on_stdin() -> bool { use libc; 0 < unsafe { libc::isatty(libc::ST...
1
13
8
a72467996bea8c835ef00c173254f429a2cb5f0b
Andrew Gallant
2016-09-25T23:57:31
Fix Windows compilation error.
diff --git a/src/pathutil.rs b/src/pathutil.rs index 3a020fa..073010b 100644 --- a/src/pathutil.rs +++ b/src/pathutil.rs @@ -114,5 +114,5 @@ pub fn is_file_name<P: AsRef<Path>>(path: P) -> bool { /// the empty string. #[cfg(not(unix))] pub fn is_file_name<P: AsRef<Path>>(path: P) -> bool { - path.as_ref().parent(...
1
1
1
ed94aedf2746172a16e2ed3933eeaf1f41602fc6
Andrew Gallant
2016-09-25T22:31:41
Permit whitelisting hidden files in ignores. Fixes #90
diff --git a/src/gitignore.rs b/src/gitignore.rs index 4d90be8..e05dc58 100644 --- a/src/gitignore.rs +++ b/src/gitignore.rs @@ -31,7 +31,7 @@ use std::path::{Path, PathBuf}; use regex; use glob; -use pathutil::strip_prefix; +use pathutil::{is_file_name, strip_prefix}; /// Represents an error that can occur when...
4
47
11
fd5ae2f7955aac1f8603713cef307a333676a467
Andrew Gallant
2016-09-25T21:28:23
Add curly brace alternates to glob format. Closes #80.
diff --git a/src/glob.rs b/src/glob.rs index 770e9b0..52691af 100644 --- a/src/glob.rs +++ b/src/glob.rs @@ -43,12 +43,19 @@ use regex::bytes::RegexSet; use pathutil::file_name; +lazy_static! { + static ref FILE_SEPARATORS: String = regex::quote(r"/\"); +} + /// Represents an error that can occur when parsing ...
1
146
28
3d6a39be06aab8522bf0be87957a145890312894
Andrew Gallant
2016-09-25T19:45:51
Fix tests on Windows. Mostly this is just using \\ instead of / in paths reported by the OS.
diff --git a/tests/tests.rs b/tests/tests.rs index bcf6217..a937959 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -46,6 +46,14 @@ macro_rules! clean { }; } +fn path(unix: &str) -> String { + if cfg!(windows) { + unix.replace("/", "\\") + } else { + unix.to_string() + } +} + sherloc...
1
23
25
d97f4049701a483570cf0ebeb2bc00e9b9a1f214
Andrew Gallant
2016-09-25T18:47:35
Stupid docopt. It thinks `--type-clear is` is a flag spec.
diff --git a/src/args.rs b/src/args.rs index 77c72ce..36c808d 100644 --- a/src/args.rs +++ b/src/args.rs @@ -175,10 +175,10 @@ File type management options: Show all supported file types and their associated globs. --type-add ARG ... - Add a new glob for a particular file type. Only one glob can ...
1
4
4
e4329037aaec244e2044a1af49b8240bfff63d9c
Martin Lindhe
2016-09-25T15:16:15
Add ts type for typescript
diff --git a/src/types.rs b/src/types.rs index c9c22b0..7f279d4 100644 --- a/src/types.rs +++ b/src/types.rs @@ -72,6 +72,7 @@ const TYPE_EXTENSIONS: &'static [(&'static str, &'static [&'static str])] = &[ ("sql", &["*.sql"]), ("swift", &["*.swift"]), ("tex", &["*.tex", "*.cls", "*.sty"]), + ("ts", &[...
1
1
0
ab0d1c1c797c0464ad4fcdfc641bcf88f9ade304
Andrew Gallant
2016-09-25T15:13:16
Be more conservative with stdin. If no paths are given to ripgrep, only read from stdin if it's a file or a FIFO. In particular, if something like `rg foo < /dev/null` is used, then don't try to read from stdin. Fixes #35, #81
diff --git a/src/args.rs b/src/args.rs index 99e01fd..921fde4 100644 --- a/src/args.rs +++ b/src/args.rs @@ -279,7 +279,8 @@ impl RawArgs { if self.arg_path.is_empty() { if atty::on_stdin() || self.flag_files - || self.flag_type_list { + ...
2
25
1
23ad8b989d029e3a751c894fa2138e65066dd657
Martin Lindhe
2016-09-25T15:06:13
--type js: include more extensions
diff --git a/src/types.rs b/src/types.rs index 3a05b5f..68b208a 100644 --- a/src/types.rs +++ b/src/types.rs @@ -41,7 +41,9 @@ const TYPE_EXTENSIONS: &'static [(&'static str, &'static [&'static str])] = &[ ("haskell", &["*.hs", "*.lhs"]), ("html", &["*.htm", "*.html"]), ("java", &["*.java"]), - ("js",...
1
3
1
9f1aae64f85b69a4b495498b5c802942a4c39143
Bharath M R
2016-09-25T00:29:14
[Fixes #46] Use 1 less worker thread than number of threads The main thread does directory traversal. Hence number of threads = main Thread + number of worker threads. We should have atleast one worker thread.
diff --git a/src/main.rs b/src/main.rs index e4f4b4f..314c88d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,6 +28,7 @@ use std::process; use std::result; use std::sync::{Arc, Mutex}; use std::thread; +use std::cmp; use deque::{Stealer, Stolen}; use grep::Grep; @@ -102,7 +103,7 @@ fn run(args: Args) -> Result...
1
2
1
4b5e789a2ae854d234cd8fd3a87380a0f99dc584
Andrew Gallant
2016-09-25T00:56:24
Strip trailing whitespace in gitignore patterns. Fixes #38.
diff --git a/src/gitignore.rs b/src/gitignore.rs index 3341e6d..4d90be8 100644 --- a/src/gitignore.rs +++ b/src/gitignore.rs @@ -279,6 +279,9 @@ impl GitignoreBuilder { if line.is_empty() || line.starts_with("#") { return Ok(()); } + if !line.ends_with("\\ ") { + line = ...
1
4
0
a44735aa8755cc262d212b50b6239a0030b9a948
Andrew Gallant
2016-09-25T00:46:20
Tweak memory maps on darwin. Namely, don't automatically pick memory maps on darwin, ever. They appear slower than standard read calls. Closes #36.
diff --git a/src/args.rs b/src/args.rs index 7306e0b..418ff12 100644 --- a/src/args.rs +++ b/src/args.rs @@ -292,6 +292,9 @@ impl RawArgs { } else if cfg!(windows) { // On Windows, memory maps appear faster than read calls. Neat. true + } else if cfg!(darwin) { ...
1
3
0
6b2efd4d88b78f2e108f1984fa9dcedfeadf383d
Andrew Gallant
2016-09-25T00:45:06
If a file is empty, still try to search it. Files like /proc/cpuinfo will advertise themselves as a normal file with size 0. Normally, this isn't a problem, but if ripgrep decides to use a memory map, it skipped searching if the file was empty since it's an error to memory map an empty file. Instead of returning 0, we...
diff --git a/src/main.rs b/src/main.rs index e4f4b4f..6987c18 100644 --- a/src/main.rs +++ b/src/main.rs @@ -322,7 +322,11 @@ impl Worker { ) -> Result<u64> { if try!(file.metadata()).len() == 0 { // Opening a memory map with an empty file results in an error. - return Ok(0); + ...
1
5
1
c8227e0cf3bc4e8d98de84d6068b3affe95235e5
Andrew Gallant
2016-09-25T00:22:02
Don't ignore first path when using --files. This is a docopt oddity, but probably not a bug. If --files is given, then just interpret the pattern (if not empty) as the first file path. Fixes #64.
diff --git a/src/args.rs b/src/args.rs index f8908be..7306e0b 100644 --- a/src/args.rs +++ b/src/args.rs @@ -463,7 +463,7 @@ impl Args { } } } - let raw: RawArgs = + let mut raw: RawArgs = Docopt::new(USAGE) .and_then(|d| d.argv(argv).ve...
2
27
1
b941c10b9005edbb520cdd38fdb94ace2969fb57
Andrew Gallant
2016-09-25T00:10:26
Fix directory whitelisting. There was a bug in the translation from a gitignore pattern to a standard glob where `!/dir` wasn't being interpreted as an absolute path. Fixes #67.
diff --git a/src/gitignore.rs b/src/gitignore.rs index 93d25a4..3341e6d 100644 --- a/src/gitignore.rs +++ b/src/gitignore.rs @@ -276,7 +276,7 @@ impl GitignoreBuilder { from: P, mut line: &str, ) -> Result<(), Error> { - if line.is_empty() { + if line.is_empty() || line.starts_with(...
2
18
17
872a1076586781b522c75792d544b9a4f4a7d082
Andrew Gallant
2016-09-25T00:09:29
Fix whitelisting precedence. Once a file is known to be whitelisted, we shouldn't check any ancestor gitignores.
diff --git a/src/ignore.rs b/src/ignore.rs index 7b70035..7dae9fa 100644 --- a/src/ignore.rs +++ b/src/ignore.rs @@ -217,30 +217,40 @@ impl Ignore { return true; } if !self.no_ignore { + let mut whitelisted = false; for id in self.stack.iter().rev() { ...
1
22
12
71ad9bf393a3d89f8c6395d963d9329f1a271d81
Andrew Gallant
2016-09-24T23:44:06
Fix trailing recursive globs in gitignore. A standard glob of `foo/**` will match `foo`, but gitignore semantics specify that `foo/**` should only match the contents of `foo` and not `foo` itself. We capture those semantics by translating `foo/**` to `foo/**/*`. Fixes #30.
diff --git a/src/gitignore.rs b/src/gitignore.rs index d5aa917..93d25a4 100644 --- a/src/gitignore.rs +++ b/src/gitignore.rs @@ -339,6 +339,12 @@ impl GitignoreBuilder { pat.pat = format!("**/{}", pat.pat); } } + // If the pattern ends with `/**`, then we should only match ...
3
19
10
f733e9ebe4a3c2a1aeedcbb0471423131885c8a5
Andrew Gallant
2016-09-24T23:43:01
Fix typo. Thanks @dmit!
diff --git a/src/gitignore.rs b/src/gitignore.rs index a47fdd9..d5aa917 100644 --- a/src/gitignore.rs +++ b/src/gitignore.rs @@ -330,7 +330,7 @@ impl GitignoreBuilder { if has_slash { opts.require_literal_separator = true; } - // If there was no leading slash, then this is a patter...
1
1
1
ce85df1d2e5a39ab021f7781abc49f5a1252011d
Andrew Gallant
2016-09-24T23:26:28
Clarify what rg does in --help. Fixes #24.
diff --git a/src/args.rs b/src/args.rs index ea1bcba..f8908be 100644 --- a/src/args.rs +++ b/src/args.rs @@ -42,7 +42,7 @@ Usage: rg [options] -e PATTERN ... [<path> ...] rg --help rg --version -rg combines the usability of The Silver Searcher with the raw speed of grep. +rg recursively searches your ...
1
1
1
7b860affbeb015aa0298a95b1e23eb8db7d181cc
Andrew Gallant
2016-09-24T23:18:48
Change the default output of --files to elide './'. This is kind of a ticky-tack change. I do think ./ as a prefix is reasonable default, *but* we strip ./ when showing search results, so it does make sense to be consistent. Fixes #21.
diff --git a/src/printer.rs b/src/printer.rs index 9a0dd1e..999e078 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -4,6 +4,7 @@ use regex::bytes::Regex; use term::{Attr, Terminal}; use term::color; +use pathutil::strip_prefix; use types::FileTypeDef; /// Printer encapsulates all output logic for searching....
2
5
5
af4dc785370a031b55d709fb7541260c185e1c54
Andrew Gallant
2016-09-24T23:14:19
Update to docopt 0.6.85. The new version won't panic if printing to stdout fails. Fixes #22.
diff --git a/Cargo.lock b/Cargo.lock index 788c84e..4b47998 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,7 +3,7 @@ name = "ripgrep" version = "0.1.17" dependencies = [ "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "docopt 0.6.84 (registry+https://github.com/rust-lang/crates.io-index)", ...
1
3
3
346bad7dfcceea62e27dba8110ac470fc52ff9bf
Andrew Gallant
2016-09-24T22:40:50
Fix handling of absolute patterns in parent gitignore files. If a gitignore file in a *parent* directory is used, then it must be matched relative to the directory it's in. ripgrep wasn't actually adhering to this rule. Consider an example: .gitignore src llvm foo Where `.gitignore` contains `/llvm/` a...
diff --git a/src/ignore.rs b/src/ignore.rs index 6fec0ea..7b70035 100644 --- a/src/ignore.rs +++ b/src/ignore.rs @@ -14,12 +14,13 @@ of `IgnoreDir`s for use during directory traversal. */ use std::error::Error as StdError; +use std::ffi::OsString; use std::fmt; use std::io; use std::path::{Path, PathBuf}; use...
2
66
19
56fe93d3434eb19b8aeaea6db738bff3a36a5884
Andrew Gallant
2016-09-24T21:31:24
Fix an absolute path name bug. Namely, if a .gitignore inside a sub-directory has an absolute pattern, e.g., `/foo/`, then we should match it relative to the directory containing the .gitignore.
diff --git a/src/gitignore.rs b/src/gitignore.rs index 6e2a372..a47fdd9 100644 --- a/src/gitignore.rs +++ b/src/gitignore.rs @@ -118,6 +118,9 @@ impl Gitignore { if let Some(p) = strip_prefix(&self.root, path) { path = p; } + if let Some(p) = strip_prefix("/", path) { + ...
1
6
1
155676b474cf1e5f11e9e32b1e4e1e5798850cff
Andrew Gallant
2016-09-24T20:34:34
Fixes #43.
diff --git a/src/ignore.rs b/src/ignore.rs index cdb6c99..6fec0ea 100644 --- a/src/ignore.rs +++ b/src/ignore.rs @@ -362,10 +362,6 @@ impl Overrides { /// Match::None (and interpreting non-matches as ignored) unless is_dir /// is true. pub fn matched<P: AsRef<Path>>(&self, path: P, is_dir: bool) -> Match...
1
0
4
a3fc4cdded50c370698154433600ea51dca390df
Andrew Gallant
2016-09-24T20:29:14
Fix a bug in the translation from a gitignore pattern to a glob. We were erroneously neglecting to prefix a pattern like `foo/` with `**/` (to make `**/foo/`) because it had a slash in it. In fact, the only reason to neglect a **/ prefix is if the pattern already starts with **/, or if the pattern is absolute. Fixes ...
diff --git a/src/gitignore.rs b/src/gitignore.rs index 2bbebd6..6e2a372 100644 --- a/src/gitignore.rs +++ b/src/gitignore.rs @@ -284,6 +284,7 @@ impl GitignoreBuilder { }; let mut opts = glob::MatchOptions::default(); let has_slash = line.chars().any(|c| c == '/'); + let is_absolute = ...
2
63
6