Open camsteffen opened 4 years ago
--invert-match
sounds like the right parameter name for this. Probably needs an invert_regexecs()
similar to match regexecs()
, and a way of switching between them appropriately (maybe a function pointer).
I don't have time to code this myself right now. Want to have a go at it?
Thanks for your response. I'm also a little too busy to claim this right now.
Would be useful indeed.
There should be a flag like
-v, --invert-match
in grep.See https://stackoverflow.com/questions/57628550/grepdiff-find-hunks-that-dont-match-a-given-regexp (someone else's question).
My use case is to "unstage hunks that do not match" in git: