Subject: Re: [PATCH 3/7] pack-objects: add GIT_TEST_FULL_NAME_HASH

From: Patrick Steinhardt <[email-masked]>
Date: Tue, 26 Nov 2024 09:26:39 +0100

On Tue, Nov 05, 2024 at 03:05:03AM +0000, Derrick Stolee via GitGitGadget wrote:
> diff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh
> index c53e93be2f7..425aa8d8789 100755
> --- a/t/t5616-partial-clone.sh
> +++ b/t/t5616-partial-clone.sh
> @@ -516,7 +516,18 @@ test_expect_success 'fetch lazy-fetches only to resolve deltas' '
>  	# Exercise to make sure it works. Git will not fetch anything from the
>  	# promisor remote other than for the big tree (because it needs to
>  	# resolve the delta).
> -	GIT_TRACE_PACKET="$(pwd)/trace" git -C client \
> +	#
> +	# TODO: the --full-name-hash option is disabled here, since this test
> +	# is fundamentally broken! When GIT_TEST_FULL_NAME_HASH=1, the server
> +	# recognizes delta bases in a different way and then sends a _blob_ to
> +	# the client with a delta base that the client does not have! This is
> +	# because the client is cloned from "promisor-server" with tree:0 but
> +	# is now fetching from "server" withot any filter. This is violating the

s/withot/without/

Also present in copies of this comment.

> diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
> index 0f0c86f9cb2..03f8c976720 100755
> --- a/t/t7406-submodule-update.sh
> +++ b/t/t7406-submodule-update.sh
> @@ -1094,6 +1094,8 @@ test_expect_success 'submodule update --quiet passes quietness to fetch with a s
>  	) &&
>  	git clone super4 super5 &&
>  	(cd super5 &&
> +	 # This test var can mess with the stderr output checked in this test.
> +	 GIT_TEST_FULL_NAME_HASH=0 \
>  	 git submodule update --quiet --init --depth=1 submodule3 >out 2>err &&

Nit: This line should now be indented.

>  	 test_must_be_empty out &&
>  	 test_must_be_empty err
> diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh
> index fc2cc9d37be..e3787bacdad 100755
> --- a/t/t7700-repack.sh
> +++ b/t/t7700-repack.sh
> @@ -309,6 +309,9 @@ test_expect_success 'no bitmaps created if .keep files present' '
>  	keep=${pack%.pack}.keep &&
>  	test_when_finished "rm -f \"\$keep\"" &&
>  	>"$keep" &&
> +
> +	# Disable --full-name-hash test due to stderr comparison.
> +	GIT_TEST_FULL_NAME_HASH=0 \
>  	git -C bare.git repack -ad 2>stderr &&

Same here.

>  	test_must_be_empty stderr &&
>  	find bare.git/objects/pack/ -type f -name "*.bitmap" >actual &&
> @@ -320,6 +323,9 @@ test_expect_success 'auto-bitmaps do not complain if unavailable' '
>  	blob=$(test-tool genrandom big $((1024*1024)) |
>  	       git -C bare.git hash-object -w --stdin) &&
>  	git -C bare.git update-ref refs/tags/big $blob &&
> +
> +	# Disable --full-name-hash test due to stderr comparison.
> +	GIT_TEST_FULL_NAME_HASH=0 \
>  	git -C bare.git repack -ad 2>stderr &&

And here.

Patrick