3 test_description
='log --grep/--author/--regexp-ignore-case/-S/-G'
30 test_expect_success
"log $kind${rest:+ $rest} ($match)" "
31 git log $rest $opt --format=%H >actual &&
32 test_cmp $expect actual
36 test_expect_success setup
'
42 git commit -m initial &&
43 git rev-parse --verify HEAD >expect_initial &&
48 git commit --author="Another Person <another@example.com>" -m second &&
49 git rev-parse --verify HEAD >expect_second
52 test_expect_success
'log --grep' '
53 git log --grep=initial --format=%H >actual &&
54 test_cmp expect_initial actual
57 test_expect_success
'log --grep --regexp-ignore-case' '
58 git log --regexp-ignore-case --grep=InItial --format=%H >actual &&
59 test_cmp expect_initial actual
62 test_expect_success
'log --grep -i' '
63 git log -i --grep=InItial --format=%H >actual &&
64 test_cmp expect_initial actual
67 test_expect_success
'log --author --regexp-ignore-case' '
68 git log --regexp-ignore-case --author=person --format=%H >actual &&
69 test_cmp expect_second actual
72 test_expect_success
'log --author -i' '
73 git log -i --author=person --format=%H >actual &&
74 test_cmp expect_second actual
77 test_log expect_nomatch
-G picked
78 test_log expect_second
-G Picked
79 test_log expect_nomatch
-G pickle
--regexp-ignore-case
80 test_log expect_nomatch
-G pickle
-i
81 test_log expect_second
-G picked
--regexp-ignore-case
82 test_log expect_second
-G picked
-i
84 test_expect_success
'log -G --textconv (missing textconv tool)' '
85 echo "* diff=test" >.gitattributes &&
86 test_must_fail git -c diff.test.textconv=missing log -Gfoo &&
90 test_expect_success
'log -G --no-textconv (missing textconv tool)' '
91 echo "* diff=test" >.gitattributes &&
92 git -c diff.test.textconv=missing log -Gfoo --no-textconv >actual &&
93 test_cmp expect_nomatch actual &&
97 test_log expect_nomatch
-S picked
98 test_log expect_second
-S Picked
99 test_log expect_second
-S picked
--regexp-ignore-case
100 test_log expect_second
-S picked
-i
101 test_log expect_nomatch
-S pickle
--regexp-ignore-case
102 test_log expect_nomatch
-S pickle
-i
104 test_expect_success
'log -S --textconv (missing textconv tool)' '
105 echo "* diff=test" >.gitattributes &&
106 test_must_fail git -c diff.test.textconv=missing log -Sfoo &&
110 test_expect_success
'log -S --no-textconv (missing textconv tool)' '
111 echo "* diff=test" >.gitattributes &&
112 git -c diff.test.textconv=missing log -Sfoo --no-textconv >actual &&
113 test_cmp expect_nomatch actual &&