Re: [PATCH 2/4] test-lib: remove unused $_x40 and $_z40 variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:

> These two have fallen out of use with the SHA-256 migration.
>
> The last use of $_x40 was removed in fc7e73d7ef (t4013: improve
> diff-post-processor logic, 2020-08-21) and
>
> The last use of $_z40 was removed in 7a868c51c2 (t5562: use $ZERO_OID,
> 2019-12-21), but it was then needlessly refactored to be hash-agnostic
> in 192b517589 (t: use hash-specific lookup tables to define test
> constants, 2020-02-22). We can just remove it.
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx>
> ---
>  t/test-lib.sh | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Nice.  Curious why we still want x5 and x35, but we'll learn soon
enough in this short series ;-)


> diff --git a/t/test-lib.sh b/t/test-lib.sh
> index d3f6af6a65..5f2ad2fd81 100644
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -511,7 +511,7 @@ SQ=\'
>  # when case-folding filenames
>  u200c=$(printf '\342\200\214')
>  
> -export _x05 _x35 _x40 _z40 LF u200c EMPTY_TREE EMPTY_BLOB ZERO_OID OID_REGEX
> +export _x05 _x35 LF u200c EMPTY_TREE EMPTY_BLOB ZERO_OID OID_REGEX
>  
>  # Each test should start with something like this, after copyright notices:
>  #
> @@ -1381,10 +1381,9 @@ then
>  fi
>  
>  # Convenience
> -# A regexp to match 5, 35 and 40 hexdigits
> +# A regexp to match 5 and 35 hexdigits
>  _x05='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
>  _x35="$_x05$_x05$_x05$_x05$_x05$_x05$_x05"
> -_x40="$_x35$_x05"
>  
>  test_oid_init
>  
> @@ -1393,7 +1392,6 @@ OID_REGEX=$(echo $ZERO_OID | sed -e 's/0/[0-9a-f]/g')
>  OIDPATH_REGEX=$(test_oid_to_path $ZERO_OID | sed -e 's/0/[0-9a-f]/g')
>  EMPTY_TREE=$(test_oid empty_tree)
>  EMPTY_BLOB=$(test_oid empty_blob)
> -_z40=$ZERO_OID
>  
>  # Provide an implementation of the 'yes' utility; the upper bound
>  # limit is there to help Windows that cannot stop this loop from




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux