New option: Stop on non-match after a match
Closes https://github.com/BurntSushi/ripgrep/issues/1790
This implements the option suggested in the linked issue. In particular, it adds a --stop-on-nonmatch flag that will stop reading a file once a non-matching line is found after a matching one. This is useful if, for example, a sorted file is being searched and the pattern being matched on is at the start of the line (so it is expected all matches will be adjacent).
Hi @BurntSushi! No particular rush, but just checking you've seen this PR? Let me know if there's any changes you'd like me to make 🙂
No, I haven't looked at it yet. Unfortunately, my time is very limited and I tend to do PR reviews in batches in order to minimize context switching. It might be a while.