Subject: Re: [PATCH] git-log: added --invert-grep option

From: Junio C Hamano <[email-masked]>
Date: Mon, 29 Dec 2014 09:56:07 -0800

Christoph Junghans <[email-masked]> writes:

> Ok, I drafted a first version of the suggest --grep-begin ...
> --grep-end syntax.

I am somewhat surprised that it was doable that cleanly.

The syntax, as I already said, is a bit too ugly to live in that
form I suggested, though ;-).

> However, I could not find a good ways to invert the match on a commit
> basis instead of the normal line-wise version.

Good point.

The only interface to tweak the way the individual matches are
turned into file-level match (by default, we say "any one of the
clauses match, we find the file to be interesting") is "--all-match"
("all of the clauses have to trigger at least once for us to find
the file interesting"), which, compared to the richer set of boolean
operations at the line level, is a kludge.

Offhand, short of overhauling that kludge to allow us to express
"The file has to have either 'atomic' or 'all-or-none' appear
somewhere, and also cannot have 'wip' anywhere", I do not think of a
good way, other than adding yet another kludge on top of the
"--all-match" that says "none of the clauses must trigger" to
express what you want to see happen in "git log" to exclude ones
that are marked with "wip", perhaps naming it "--none-match" or
something.

Thanks.