Re: [PATCH v5 2/4] t4216: test changed path filters with high bit paths
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 13, 2023, 22:50 UTC
- Message-ID
- <xmqq4jm7l92q.fsf@gitster.g>
- In-Reply-To
- <94a4c7af38525d04f3effc035084e661fe382dcd.1689283789.git.jonathantanmy@google.com>
Jonathan Tan <jonathantanmy@google.com> writes:
Show 24 quoted lines
> Subsequent commits will teach Git another version of changed path
> filter that has different behavior with paths that contain at least
> one character with its high bit set, so test the existing behavior as
> a baseline.
>
> Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> t/t4216-log-bloom.sh | 47 ++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 47 insertions(+)
>
> diff --git a/t/t4216-log-bloom.sh b/t/t4216-log-bloom.sh
> index fa9d32facf..0cf208fdf5 100755
> --- a/t/t4216-log-bloom.sh
> +++ b/t/t4216-log-bloom.sh
> @@ -404,4 +404,51 @@ test_expect_success 'Bloom generation backfills empty commits' '
> )
> '
>
> +get_bdat_offset () {
> + perl -0777 -ne \
> + 'print unpack("N", "$1") if /BDAT\0\0\0\0(....)/ or exit 1' \
> + .git/objects/info/commit-graph
> +}Hopefully the 8-byte anchoring pattern is unique enough at least for the purpose of this test script.