user972946
user972946

Reputation:

Git diff: how to do the opposite of -G<regex>?

Git-diff has an option -G that uses a regex to match differences.

How to do the opposite? I.e. look for differences whose added or removed lines do not match the given regex?

Upvotes: 5

Views: 263

Answers (1)

devnull
devnull

Reputation: 123448

I don't think that you can achieve this using regex. A workaround would be to say:

diff <(git diff) <(git diff -G <regex>)

Upvotes: 1

Related Questions