From: Michael J Gruber Date: Fri, 14 Sep 2012 09:46:40 +0000 (+0200) Subject: t7810-grep: test multiple --grep with and without --all-match X-Git-Tag: v1.7.12.2~2^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dfe3642515d3d2679bdc25c2be4d961201e9f095;p=git t7810-grep: test multiple --grep with and without --all-match Signed-off-by: Michael J Gruber Signed-off-by: Junio C Hamano --- diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh index 180e998697..b841909315 100755 --- a/t/t7810-grep.sh +++ b/t/t7810-grep.sh @@ -479,6 +479,22 @@ test_expect_success 'log grep (6)' ' test_cmp expect actual ' +test_expect_success 'log with multiple --grep uses union' ' + git log --grep=i --grep=r --format=%s >actual && + { + echo fourth && echo third && echo initial + } >expect && + test_cmp expect actual +' + +test_expect_success 'log --all-match with multiple --grep uses intersection' ' + git log --all-match --grep=i --grep=r --format=%s >actual && + { + echo third + } >expect && + test_cmp expect actual +' + test_expect_success 'log --grep --author implicitly uses all-match' ' # grep matches initial and second but not third # author matches only initial and third