Skip to content

Commit 025d529

Browse files
ttaylorrgitster
authored andcommitted
t4216: use an '&&'-chain
In a759bfa (t4216: add end to end tests for git log with Bloom filters, 2020-04-06), a 'rm' invocation was added without a corresponding '&&' chain. When 'trace.perf' already exists, everything works fine. However, the function can be executed without 'trace.perf' on disk (eg., when the subset of tests run is altered with '--run'), and so the bare 'rm' complains about a missing file. To remove some noise from the test log, invoke 'rm' with '-f', at which point it is sensible to place the 'rm -f' in an '&&'-chain, which is both (1) our usual style, and (2) avoids a broken chain in the future if more commands are added at the beginning of the function. Helped-by: Eric Sunshine <[email protected]> Helped-by: Jeff King <[email protected]> Signed-off-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4f36440 commit 025d529

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t4216-log-bloom.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ sane_unset GIT_TRACE2_PERF_BRIEF
5353
sane_unset GIT_TRACE2_CONFIG_PARAMS
5454

5555
setup () {
56-
rm "$TRASH_DIRECTORY/trace.perf"
56+
rm -f "$TRASH_DIRECTORY/trace.perf" &&
5757
git -c core.commitGraph=false log --pretty="format:%s" $1 >log_wo_bloom &&
5858
GIT_TRACE2_PERF="$TRASH_DIRECTORY/trace.perf" git -c core.commitGraph=true log --pretty="format:%s" $1 >log_w_bloom
5959
}

0 commit comments

Comments
 (0)