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 <jonathantanmy@google.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Tan committed
Mar 2, 2017 at 11:50 UTC
67f2825174882ae7d4e252f48fc1ce7f780196fb
1 file changed
+2
-1
t/perf/p0001-rev-list.sh
+2
-1
@@ -15,7 +15,8 @@ test_perf 'rev-list --all --objects' '
15
'
16
17
test_expect_success 'create new unreferenced commit' '
18
- commit=$(git commit-tree HEAD^{tree} -p HEAD)
18
+ commit=$(git commit-tree HEAD^{tree} -p HEAD) &&
19
+ test_export commit
20
'
21
22
test_perf 'rev-list $commit --not --all' '