t7810-grep: test interaction of multiple --grep and --author options
There are tests for this interaction already. Restructure slightly and avoid any claims about --all-match. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
00f62a64d4
commit
2cb03e76a0
@ -495,16 +495,6 @@ test_expect_success 'log --all-match with multiple --grep uses intersection' '
|
|||||||
test_cmp expect actual
|
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
|
|
||||||
git log --author="A U Thor" --grep=s --grep=l --format=%s >actual &&
|
|
||||||
{
|
|
||||||
echo initial
|
|
||||||
} >expect &&
|
|
||||||
test_cmp expect actual
|
|
||||||
'
|
|
||||||
|
|
||||||
test_expect_success 'log with multiple --author uses union' '
|
test_expect_success 'log with multiple --author uses union' '
|
||||||
git log --author="Thor" --author="Aster" --format=%s >actual &&
|
git log --author="Thor" --author="Aster" --format=%s >actual &&
|
||||||
{
|
{
|
||||||
@ -521,17 +511,33 @@ test_expect_success 'log --all-match with multiple --author still uses union' '
|
|||||||
test_cmp expect actual
|
test_cmp expect actual
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'log with --grep and multiple --author uses all-match' '
|
test_expect_success 'log --grep --author uses intersection' '
|
||||||
git log --author="Thor" --author="Night" --grep=i --format=%s >actual &&
|
# grep matches only third and fourth
|
||||||
|
# author matches only initial and third
|
||||||
|
git log --author="A U Thor" --grep=r --format=%s >actual &&
|
||||||
{
|
{
|
||||||
echo third && echo initial
|
echo third
|
||||||
} >expect &&
|
} >expect &&
|
||||||
test_cmp expect actual
|
test_cmp expect actual
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'log with --grep and multiple --author uses all-match' '
|
test_expect_success 'log --grep --grep --author takes union of greps and intersects with author' '
|
||||||
git log --author="Thor" --author="Night" --grep=q --format=%s >actual &&
|
# grep matches initial and second but not third
|
||||||
>expect &&
|
# author matches only initial and third
|
||||||
|
git log --author="A U Thor" --grep=s --grep=l --format=%s >actual &&
|
||||||
|
{
|
||||||
|
echo initial
|
||||||
|
} >expect &&
|
||||||
|
test_cmp expect actual
|
||||||
|
'
|
||||||
|
|
||||||
|
test_expect_success 'log --grep --author --author takes union of authors and intersects with grep' '
|
||||||
|
# grep matches only initial and third
|
||||||
|
# author matches all but second
|
||||||
|
git log --author="Thor" --author="Night" --grep=i --format=%s >actual &&
|
||||||
|
{
|
||||||
|
echo third && echo initial
|
||||||
|
} >expect &&
|
||||||
test_cmp expect actual
|
test_cmp expect actual
|
||||||
'
|
'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user