mirror of
https://github.com/git/git.git
synced 2024-11-30 21:44:02 +08:00
67f2825174
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>
31 lines
592 B
Bash
Executable File
31 lines
592 B
Bash
Executable File
#!/bin/sh
|
|
|
|
test_description="Tests history walking performance"
|
|
|
|
. ./perf-lib.sh
|
|
|
|
test_perf_default_repo
|
|
|
|
test_perf 'rev-list --all' '
|
|
git rev-list --all >/dev/null
|
|
'
|
|
|
|
test_perf 'rev-list --all --objects' '
|
|
git rev-list --all --objects >/dev/null
|
|
'
|
|
|
|
test_expect_success 'create new unreferenced commit' '
|
|
commit=$(git commit-tree HEAD^{tree} -p HEAD) &&
|
|
test_export commit
|
|
'
|
|
|
|
test_perf 'rev-list $commit --not --all' '
|
|
git rev-list $commit --not --all >/dev/null
|
|
'
|
|
|
|
test_perf 'rev-list --objects $commit --not --all' '
|
|
git rev-list --objects $commit --not --all >/dev/null
|
|
'
|
|
|
|
test_done
|