@@ -495,16 +495,6 @@ test_expect_success 'log --all-match with multiple --grep uses intersection' '
495495 test_cmp expect actual
496496'
497497
498- test_expect_success ' log --grep --author implicitly uses all-match' '
499- # grep matches initial and second but not third
500- # author matches only initial and third
501- git log --author="A U Thor" --grep=s --grep=l --format=%s >actual &&
502- {
503- echo initial
504- } >expect &&
505- test_cmp expect actual
506- '
507-
508498test_expect_success ' log with multiple --author uses union' '
509499 git log --author="Thor" --author="Aster" --format=%s >actual &&
510500 {
@@ -521,17 +511,33 @@ test_expect_success 'log --all-match with multiple --author still uses union' '
521511 test_cmp expect actual
522512'
523513
524- test_expect_success ' log with --grep and multiple --author uses all-match' '
525- git log --author="Thor" --author="Night" --grep=i --format=%s >actual &&
514+ test_expect_success ' log --grep --author uses intersection' '
515+ # grep matches only third and fourth
516+ # author matches only initial and third
517+ git log --author="A U Thor" --grep=r --format=%s >actual &&
526518 {
527- echo third && echo initial
519+ echo third
528520 } >expect &&
529521 test_cmp expect actual
530522'
531523
532- test_expect_success ' log with --grep and multiple --author uses all-match' '
533- git log --author="Thor" --author="Night" --grep=q --format=%s >actual &&
534- >expect &&
524+ test_expect_success ' log --grep --grep --author takes union of greps and intersects with author' '
525+ # grep matches initial and second but not third
526+ # author matches only initial and third
527+ git log --author="A U Thor" --grep=s --grep=l --format=%s >actual &&
528+ {
529+ echo initial
530+ } >expect &&
531+ test_cmp expect actual
532+ '
533+
534+ test_expect_success ' log --grep --author --author takes union of authors and intersects with grep' '
535+ # grep matches only initial and third
536+ # author matches all but second
537+ git log --author="Thor" --author="Night" --grep=i --format=%s >actual &&
538+ {
539+ echo third && echo initial
540+ } >expect &&
535541 test_cmp expect actual
536542'
537543
0 commit comments