From 49f89f65cd39306655a9b382a1244e34fb90fff1 Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Tue, 11 Sep 2012 16:40:46 +0200 Subject: [PATCH] rev-list/log: document logic with several limiting options 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). --- 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 5436eba6e7..b2dbfb5f94 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:: -- 2.11.4.GIT