pijul_org / pijul

#345 Add pijul grep command

Opened by ndavis, on December 7, 2018
Closed
ndavis commented on December 7, 2018

I often find git's grep command useful for searching a codebase without needing to filter out build artifacts. Pijul doesn't have a grep command, so I thought I'd add it.

dragonmaus commented on December 8, 2018

Does ripgrep not fill that space nicely? It honours .ignore by default, so you need not manually filter stuff out most of the time.

ndavis commented on December 8, 2018

I suppose ripgrep covers the working tree, assuming you have everything you want to filter out already in .ignore, but I don't think it covers searching a specific revision / tag.

FlorentBecker added a patch:
Add grep command (#345) by Nathan Davis , created on December 8, 2018

9pjoFiawccUE94wrGQn9jXiCatKtuZHsoUoDxzoXwyjiWSGVYaReS6TiGBDhdXW3RXm6EXP1shpkqcB9mFYsokgX
latest
master
testing
FlorentBecker added a patch:
grep: add --branch option (#345) by Nathan Davis , created on December 9, 2018

9uCviA4N2MqcjtEHYRAbfQeDZE4zmzTozHkgVTES6mqM4mPfV3hUH6mnQPxSYwRbdem9uys5qfBSnK3Amy8cCD1f
latest
master
testing
pmeunier commented on December 9, 2018

Wow, this is really cool, I just accepted these patches. Thanks a lot! Would you mind adding one or two tests to our test suite in pijul/tests/cases?

ndavis commented on December 10, 2018

Cool, glad you liked it! I will add some tests, and probably a few enhancements as well.

pmeunier commented on December 10, 2018

One really cool enhancement could be to write a dedicated instance of graph::Writer that doesn’t allocate anything and just grecs line by line.

FlorentBecker added a patch:
More efficient grep by blabla, created on December 14, 2018

6RM7Mg5Lagwh1sjfCtHqxkZsBKnPx8TduJ4WGnmfcEytxhnrG3c4AhQs3pGRRcaybvw97BFE1Z3LQhkw3Yta7RDk
latest
master
testing
pmeunier commented on December 14, 2018

Done!