Junio C Hamano <gits...@pobox.com> writes:
>> diff --git a/Documentation/rev-list-options.txt
>> index 5436eba..b2dbfb5 100644
>> --- a/Documentation/rev-list-options.txt
>> +++ b/Documentation/rev-list-options.txt
>> @@ -6,6 +6,19 @@ special notations explained in the description, additional
>> limiting may be applied. Note that they are applied before commit
>> ordering and formatting options, such as '--reverse'.
>> +Different options are ANDed: '--author=bar --grep=foo'
>> +limits to commits which match both conditions.
>> +Several occurences of the '--grep' option are ORed: '--grep=foo --grep=bar'
>> +limits to commits matching any of these conditions.
>> +(If '--all-match' is given, the conditions are ANDed.)
>> +Several occurences of the '--author' and '--committer' options are ORed
>> +(because there can be only one each per commit).
> As I would really want to eventually see the revision command option
> parser understand the full power of grep expressions in the future,
> I would really want to avoid a misleading explanation that calls
> what "--all-match" does as "ANDed".
Assuming that the patch I posted earlier actually works, I think the
description can become vastly simpler, if you stop explaining author
and committer in terms of "grep". It is implementation detail that
the same grep machinery is handling these two header fields and the
end users do not have to even be aware of.
You can use "--grep=foo" to limit the output to commits that
mention "foo" in their messages. If you use more than one
of them, e.g. "--grep=foo" and "--grep=bar", by default, the
command shows commits that mention "foo" or "bar" (or
naturally, both) in their messages. If you want to limit
the output to commits that mention both "foo" and "bar" in
their messages (note that they do not have to appear on the
same line), you can use "--all-match".
You can use "--author=Linus" to limit the output to commits
authored by Linus. If you use more than one of them,
e.g. "--author=Linus" and "--author=Junio", the command
shows commits that are authored by either Linus or Junio.
As a commit cannot be authored by more than one person,
there is no option to choose commits that are authored by
Linus and Junio (and there is no need for such an option).
To limit the output with the committer information, use
"--committer=<person>" instead of "--author=<person>".
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html