120
121
test_expect_success 'diff-filter=M' '
122
123
- actual=$(git log --pretty="format:%s" --diff-filter=M HEAD) &&
124
- expect=$(echo second) &&
125
- verbose test "$actual" = "$expect"
123
+ git log --pretty="format:%s" --diff-filter=M HEAD >actual &&
124
+ printf "second" >expect &&
125
+ test_cmp expect actual
126
127
'
128
129
test_expect_success 'diff-filter=D' '
130
131
- actual=$(git log --no-renames --pretty="format:%s" --diff-filter=D HEAD) &&
132
- expect=$(echo sixth ; echo third) &&
133
- verbose test "$actual" = "$expect"
131
+ git log --no-renames --pretty="format:%s" --diff-filter=D HEAD >actual &&
132
+ printf "sixth\nthird" >expect &&
133
+ test_cmp expect actual
134
135
'
136
137
test_expect_success 'diff-filter=R' '
138
139
- actual=$(git log -M --pretty="format:%s" --diff-filter=R HEAD) &&
140
- expect=$(echo third) &&
141
- verbose test "$actual" = "$expect"
139
+ git log -M --pretty="format:%s" --diff-filter=R HEAD >actual &&
140
+ printf "third" >expect &&
141
+ test_cmp expect actual
142
143
'
144
145
test_expect_success 'diff-filter=C' '
146
147
- actual=$(git log -C -C --pretty="format:%s" --diff-filter=C HEAD) &&
148
- expect=$(echo fourth) &&
149
- verbose test "$actual" = "$expect"
147
+ git log -C -C --pretty="format:%s" --diff-filter=C HEAD >actual &&
148
+ printf "fourth" >expect &&
149
+ test_cmp expect actual
150
151
'
152
153
test_expect_success 'git log --follow' '
154
155
- actual=$(git log --follow --pretty="format:%s" ichi) &&
156
- expect=$(echo third ; echo second ; echo initial) &&
157
- verbose test "$actual" = "$expect"
155
+ git log --follow --pretty="format:%s" ichi >actual &&
156
+ printf "third\nsecond\ninitial" >expect &&
157
+ test_cmp expect actual
158
'
159
160
test_expect_success 'git config log.follow works like --follow' '
161
test_config log.follow true &&
162
- actual=$(git log --pretty="format:%s" ichi) &&
163
- expect=$(echo third ; echo second ; echo initial) &&
164
- verbose test "$actual" = "$expect"
162
+ git log --pretty="format:%s" ichi >actual &&
163
+ printf "third\nsecond\ninitial" >expect &&
164
+ test_cmp expect actual
165
'
166
167
test_expect_success 'git config log.follow does not die with multiple paths' '
176
177
test_expect_success 'git config log.follow is overridden by --no-follow' '
178
test_config log.follow true &&
179
- actual=$(git log --no-follow --pretty="format:%s" ichi) &&
180
- expect="third" &&
181
- verbose test "$actual" = "$expect"
179
+ git log --no-follow --pretty="format:%s" ichi >actual &&
180
+ printf "third" >expect &&
181
+ test_cmp expect actual
182
'
183
184
# Note that these commits are intentionally listed out of order.