]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t7002-grep.sh
"log --author=me --grep=it" should find intersection, not union
[thirdparty/git.git] / t / t7002-grep.sh
index 76c5e091b7d45bde38f34dc9726c51034ee7f9eb..6baa4461f704a39807cee861071f075f09da03da 100755 (executable)
@@ -357,7 +357,7 @@ test_expect_success 'log grep (4)' '
 '
 
 test_expect_success 'log grep (5)' '
-       git log --author=Thor -F --grep=Thu --pretty=tformat:%s >actual &&
+       git log --author=Thor -F --pretty=tformat:%s >actual &&
        ( echo third ; echo initial ) >expect &&
        test_cmp expect actual
 '
@@ -368,6 +368,14 @@ test_expect_success 'log grep (6)' '
        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 'grep with CE_VALID file' '
        git update-index --assume-unchanged t/t &&
        rm t/t &&