@@ -495,16 +495,6 @@ test_expect_success 'log --all-match with multiple --grep uses intersection' '
495
495
test_cmp expect actual
496
496
'
497
497
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
-
508
498
test_expect_success ' log with multiple --author uses union' '
509
499
git log --author="Thor" --author="Aster" --format=%s >actual &&
510
500
{
@@ -521,17 +511,33 @@ test_expect_success 'log --all-match with multiple --author still uses union' '
521
511
test_cmp expect actual
522
512
'
523
513
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 &&
526
518
{
527
- echo third && echo initial
519
+ echo third
528
520
} >expect &&
529
521
test_cmp expect actual
530
522
'
531
523
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 &&
535
541
test_cmp expect actual
536
542
'
537
543
0 commit comments