Re: [PATCH v2 09/10] pretty: implement 'summary' format

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

 



On Fri, Nov 8, 2019 at 3:08 PM Denton Liu <liu.denton@xxxxxxxxx> wrote:
> Signed-off-by: Denton Liu <liu.denton@xxxxxxxxx>
> ---
> diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh
> @@ -154,20 +154,23 @@ do
> -test_expect_success 'NUL termination with --reflog --pretty=oneline' '
> -       >expect &&
> -       revs="$(git rev-list --reflog)" &&
> -       [...]
> -       test_cmp expect actual
> -'
> +for p in oneline summary
> +do
> +       test_expect_success "NUL termination with --reflog --pretty=$p" '
> +               >expect &&
> +               revs="$(git rev-list --reflog)" &&
> +               [...]
> +               test_cmp expect actual
> +       '
> +done

This patch would be less noisy (by eliminating the indentation change)
if you wrapped this test in a for-loop back in 7/10 where it was
introduced, with the intention of adding more items to the 'for' list.
So, in 7/10, you'd have this:

    for p in online
    do
        test_expect_success "NUL termination with --reflog --pretty=$p" '
            ...
        '
    done

and this patch, 9/10, would just make the minor change:

    -for p in oneline
    +for p in oneline summary

Having a for-loop with only a single item is a minor-ugly which pays
off with less noise in subsequent patch(es), thus easing review
burden.



[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