Re: [PATCH 1/1] t6024: modernize style

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

 



On Tue, Nov 5, 2019 at 6:58 PM Elijah Newren via GitGitGadget
<gitgitgadget@xxxxxxxxx> wrote:
> No substantive changes, just a few cosmetic changes:
>   * Indent steps of an individual test
>   * Don't have logic between the "test_expect_success" blocks that
>     the next block will depend upon, move it into the
>     test_expect_success section itself
>   * Fix spacing around redirection operators to match git style
>
> Signed-off-by: Elijah Newren <newren@xxxxxxxxx>
> ---
> diff --git a/t/t6024-recursive-merge.sh b/t/t6024-recursive-merge.sh
> @@ -15,73 +15,76 @@ GIT_COMMITTER_DATE="2006-12-12 23:28:00 +0100"
>  test_expect_success "setup tests" '

Since you're modernizing, perhaps use single quotes around the test
title rather than double quotes. Same comment applies to other test
titles.

> +       echo 1 > a1 &&

The commit message talks about fixing spacing around redirection
operators but neither this instance nor any of the others in this
function have been fixed.

> +       git add a1 &&
> +       GIT_AUTHOR_DATE="2006-12-12 23:00:00" git commit -m 1 a1 &&
> +       ...
>  '
> +       cat >expect <<-EOF &&

Since there's no interpolation going on inside the here-doc, perhaps
use -\EOF instead. Same comment applies to other here-docs.

> +               <<<<<<< HEAD
> +               F
> +               =======
> +               G
> +               >>>>>>> G
> +               EOF

Custom in most scripts is to indent the here-doc body only as far as
the command which opens it (that is, give it the same indentation as
the 'cat' command). Same comment applies to other here-docs.



[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