summaryrefslogtreecommitdiff
path: root/t/perf/p0001-rev-list.sh
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2017-03-02 19:50:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-03 18:54:42 (GMT)
commit67f2825174882ae7d4e252f48fc1ce7f780196fb (patch)
tree2346d82075296099c2af3bc4e62f153e11eb0d27 /t/perf/p0001-rev-list.sh
parente7e07d5a4fcc2a203d9873968ad3e6bd4d7419d7 (diff)
downloadgit-67f2825174882ae7d4e252f48fc1ce7f780196fb.zip
git-67f2825174882ae7d4e252f48fc1ce7f780196fb.tar.gz
git-67f2825174882ae7d4e252f48fc1ce7f780196fb.tar.bz2
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>
Diffstat (limited to 't/perf/p0001-rev-list.sh')
-rwxr-xr-xt/perf/p0001-rev-list.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/perf/p0001-rev-list.sh b/t/perf/p0001-rev-list.sh
index 16359d5..ebf1724 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' '