Re: [PATCH v3 11/24] midx: read pack names into array

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

 



On Thu, Jul 5, 2018 at 8:54 PM Derrick Stolee <stolee@xxxxxxxxx> wrote:
> Signed-off-by: Derrick Stolee <dstolee@xxxxxxxxxxxxx>
> ---
> diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh
> @@ -8,8 +8,13 @@ midx_read_expect () {
>         cat >expect <<-EOF

Broken &&-chain.

>         header: 4d494458 1 1 $NUM_PACKS
>         chunks: pack_names
> -       object_dir: .
> +       packs:
>         EOF
> +       if [ $NUM_PACKS -ge 1 ]

On this project, use 'test' rather than '['.

> +       then
> +               ls pack/ | grep idx | sort >> expect
> +       fi

Broken &&-chain.

> +       printf "object_dir: .\n" >>expect &&

All this code building up 'expect' could be in a {...} block to make
it clearer and less noisy:

    {
        cat <<-EOF &&
        ...
        EOF
        if test $NUM_PACKS -ge 1
        then
            ls -1 pack/ | ...
        fi &&
        printf "..."
    } >expect &&

And, some pointless bike-shedding while here: perhaps dashes instead
of underlines? "pack-names", "object-dir"

>         test-tool read-midx . >actual &&
>         test_cmp expect actual
>  }



[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