Is there any option for git diff
that allows to just consider hunks that match some specific criteria (e.g. a regular expression)?
I want diff to just show me hunks that, for example, start with line matching the regex .*<<<special_diff.*
and end with a line matching the regex .*\sspecial_diff>>>
I am looking for solutions that would allow to do that, keeping performance fast and staying simple.
Note: it should be able to match multiple lines, so that I could match (into a hunk) a multiline block of text between specific delimiters.
Matching just if a hunk contains a full block (open + close delimiters); for example matching a multiline block delimited by <body>
and </body>
.