Re: [PATCH v2 0/3] Easier access to index-v4
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 24, 2014, 19:35 UTC
- Message-ID
- <xmqqwqgk8fsq.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <xmqqios49yyq.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 9 quoted lines
> Thomas Gummerer <t.gummerer@gmail.com> writes: > >> previous round was at $gmane/242198. >> >> Since then I've squashed the fixes suggested by Junio, added a test >> showing what should happen if an index file is present and >> GIT_INDEX_VERSION is set and fixed the typo found by Eric. > > Looks good; thanks.
Tests, seem to leak these unnecessary diag (not limited to t0010).
sh t0010-racy-git.sh
warning: GIT_INDEX_VERSION set, but the value is invalid.
Using version 3
ok 1 - Racy GIT trial #0 part A
ok 2 - Racy GIT trial #0 part B
warning: GIT_INDEX_VERSION set, but the value is invalid.
Using version 3
...
# passed all 10 test(s)
1..10The same thing under prove.
*** prove ***
t0010-racy-git.sh .. warning: GIT_INDEX_VERSION set, but the value is invalid.
Using version 3
t0010-racy-git.sh .. 2/? warning: GIT_INDEX_VERSION set, but the value is invalid.
Using version 3
t0010-racy-git.sh .. 4/? warning: GIT_INDEX_VERSION set, but the value is invalid.
Using version 3
t0010-racy-git.sh .. 6/? warning: GIT_INDEX_VERSION set, but the value is invalid.
Using version 3
t0010-racy-git.sh .. 8/? warning: GIT_INDEX_VERSION set, but the value is invalid.
Using version 3
t0010-racy-git.sh .. ok
All tests successful.I suspect the real culprit is the early part in test-lib.sh that sets GIT_INDEX_VERSION explicitly from TEST_GIT_INDEX_VERSION when the latter is not even specified.
Something along this line, perhaps?
t/test-lib.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh index 492f81f..01a98cb 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -108,8 +108,11 @@ export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME export EDITOR -GIT_INDEX_VERSION="$TEST_GIT_INDEX_VERSION" -export GIT_INDEX_VERSION +if test -n "${TEST_GIT_INDEX_VERSION+isset}" +then + GIT_INDEX_VERSION="$TEST_GIT_INDEX_VERSION" + export GIT_INDEX_VERSION +fi # Add libc MALLOC and MALLOC_PERTURB test # only if we are not executing the test with valgrind