From: Jonathan Tan Date: Thu, 2 Mar 2017 19:50:41 +0000 (-0800) Subject: t/perf: export variable used in other blocks X-Git-Tag: v2.12.3~27^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/67f2825174882ae7d4e252f48fc1ce7f780196fb t/perf: export variable used in other blocks In p0001, a variable was created in a test_expect_success block to be used in later test_perf blocks, but was not exported. This caused the variable to not appear in those blocks (this can be verified by writing 'test -n "$commit"' in those blocks), resulting in a slightly different invocation than what was intended. Export that variable. Signed-off-by: Jonathan Tan Reviewed-by: Jeff King Signed-off-by: Junio C Hamano --- diff --git a/t/perf/p0001-rev-list.sh b/t/perf/p0001-rev-list.sh index 16359d51ae..ebf172401b 100755 --- a/t/perf/p0001-rev-list.sh +++ b/t/perf/p0001-rev-list.sh @@ -15,7 +15,8 @@ test_perf 'rev-list --all --objects' ' ' test_expect_success 'create new unreferenced commit' ' - commit=$(git commit-tree HEAD^{tree} -p HEAD) + commit=$(git commit-tree HEAD^{tree} -p HEAD) && + test_export commit ' test_perf 'rev-list $commit --not --all' '