MALLOC_CHECK: Allow checking to be disabled from config.mak
[gitweb.git] / t / t7810-grep.sh
index 91db352cc7ed5faa24eb27542d5ce8c4fe622303..f698001c996ea20847c574f04dad9a65684f324f 100755 (executable)
@@ -546,6 +546,36 @@ test_expect_success 'log grep (6)' '
        test_cmp expect actual
 '
 
+test_expect_success 'log grep (7)' '
+       git log -g --grep-reflog="commit: third" --pretty=tformat:%s >actual &&
+       echo third >expect &&
+       test_cmp expect actual
+'
+
+test_expect_success 'log grep (8)' '
+       git log -g --grep-reflog="commit: third" --grep-reflog="commit: second" --pretty=tformat:%s >actual &&
+       {
+               echo third && echo second
+       } >expect &&
+       test_cmp expect actual
+'
+
+test_expect_success 'log grep (9)' '
+       git log -g --grep-reflog="commit: third" --author="Thor" --pretty=tformat:%s >actual &&
+       echo third >expect &&
+       test_cmp expect actual
+'
+
+test_expect_success 'log grep (9)' '
+       git log -g --grep-reflog="commit: third" --author="non-existant" --pretty=tformat:%s >actual &&
+       : >expect &&
+       test_cmp expect actual
+'
+
+test_expect_success 'log --grep-reflog can only be used under -g' '
+       test_must_fail git log --grep-reflog="commit: third"
+'
+
 test_expect_success 'log with multiple --grep uses union' '
        git log --grep=i --grep=r --format=%s >actual &&
        {
@@ -628,6 +658,18 @@ test_expect_success 'log --all-match --grep --grep --author takes intersection'
        test_cmp expect actual
 '
 
+test_expect_success 'log --author does not search in timestamp' '
+       : >expect &&
+       git log --author="$GIT_AUTHOR_DATE" >actual &&
+       test_cmp expect actual
+'
+
+test_expect_success 'log --committer does not search in timestamp' '
+       : >expect &&
+       git log --committer="$GIT_COMMITTER_DATE" >actual &&
+       test_cmp expect actual
+'
+
 test_expect_success 'grep with CE_VALID file' '
        git update-index --assume-unchanged t/t &&
        rm t/t &&