Skip to content

Commit 67f2825

Browse files
jonathantanmygitster
authored andcommitted
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>
1 parent e7e07d5 commit 67f2825

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/perf/p0001-rev-list.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ test_perf 'rev-list --all --objects' '
1515
'
1616

1717
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
1920
'
2021

2122
test_perf 'rev-list $commit --not --all' '

0 commit comments

Comments
 (0)