git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 0/3] Easier access to index-v4

From
Thomas Gummerer <t.gummerer@gmail.com>
Date
Feb 24, 2014, 19:53 UTC
Message-ID
<87y510s2xh.fsf@hank.lan>
In-Reply-To
<xmqqwqgk8fsq.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 48 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> 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..10
>
>
> The 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?

Sorry about this, I didn't run the test suite without TEST_GIT_INDEX_VERSION in config.mak which I obviously should have.

Yes, this looks good to me, thanks!
Show 21 quoted lines
>  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
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 8 in “Easier access to index-v4”
  1. 0/3 Easier access to index-v4Thomas Gummerer, Feb 23, 2014
  2. 1/3 introduce GIT_INDEX_VERSION environment variableThomas Gummerer, Feb 23, 2014
  3. 2/3 test-lib: allow setting the index format versionThomas Gummerer, Feb 23, 2014
  4. 3/3 read-cache: add index.version config variableThomas Gummerer, Feb 23, 2014
  5. Junio C HamanoFeb 24, 2014
  6. Junio C HamanoFeb 24, 2014
  7. Thomas GummererFeb 24, 2014
  8. Junio C HamanoFeb 24, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.