Subject: Re: [PATCH 6/7] parallel-checkout: add tests related to .gitattributes

From: Derrick Stolee <[email-masked]>
Date: Fri, 23 Apr 2021 15:48:49 -0400

On 4/22/2021 11:17 AM, Matheus Tavares wrote:
> Add tests to confirm that the `struct conv_attrs` data is correctly
> passed from the main process to the workers, and that they can properly
> convert the blobs before writing them to the working tree.
> 
> Also check that parallel-ineligible entries, such as regular files that
> require external filters, are correctly smudge and written when
> parallel-checkout is enabled.
> 
> Note: to avoid repeating code, some helper functions are extracted from
> t0028 into a common lib file.

nit: this movement of helper functions could be its own patch to reduce
cognitive load when already reading a very detailed set of tests.

> diff --git a/t/t2082-parallel-checkout-attributes.sh b/t/t2082-parallel-checkout-attributes.sh
> new file mode 100755
> index 0000000000..2525457961
> --- /dev/null
> +++ b/t/t2082-parallel-checkout-attributes.sh
> @@ -0,0 +1,194 @@
> +#!/bin/sh
> +
> +test_description='parallel-checkout: attributes
> +
> +Verify that parallel-checkout correctly creates files that require
> +conversions, as specified in .gitattributes. The main point here is
> +to check that the conv_attr data is correctly sent to the workers
> +and that it contains sufficient information to smudge files
> +properly (without access to the index or attribute stack).
> +'

The tests themselves are quite dense, but definitely appear to be
doing valuable cases to cover an important feature of parallel
checkout. Each one is so different from the other that I can't
find ways to reorganize them for better readability.

Thanks,
-Stolee