From: Michael J Gruber Date: Thu, 13 Sep 2012 14:04:44 GMT Subject: [PATCHv2 6/6] rev-list/log: document logic with several limiting options Message-ID: <49f89f65cd39306655a9b382a1244e34fb90fff1.1347544259.git.git@drmicha.warpmail.net> In-Reply-To: <7v7grzdue6.fsf@alter.siamese.dyndns.org> The current behavior is probably as useful as it is confusing. In any case it is going to stay. So, document it. This does not take into account the issue of 'log --all-match --author=me --grep=foo --grep=bar' not honoring '--all-match' because it is hopefully a corner case (and, even more hopefully, fixed some time soon). Signed-off-by: Michael J Gruber --- Documentation/rev-list-options.txt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Documentation/rev-list-options.txt b/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 commit 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). + +For all other options, only the last occurence of the same option is +taken into account: '-n 5 -3' is '-3' and '-n 3 -n 5' is '-n 5'. + -- -n 'number':: @@ -47,7 +60,7 @@ endif::git-rev-list[] --all-match:: Limit the commits output to ones that match all given --grep, - --author and --committer instead of ones that match at least one. + instead of ones that match at least one. -i:: --regexp-ignore-case:: -- 1.7.12.463.gbd9d638