git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Nov 6, 2019, 00:11 UTC
Message-ID
<CAPig+cRdG+RZOeXuJLfF7UyiBccHs6yWnCqt2d1oyTTuwp6=YQ@mail.gmail.com>
In-Reply-To
<c6349cdbd057ccbcced3220ff3474b2e2083617e.1572998303.git.gitgitgadget@gmail.com>

On Tue, Nov 5, 2019 at 6:58 PM Elijah Newren via GitGitGadget <gitgitgadget@gmail.com> wrote:

Show 12 quoted lines
> 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@gmail.com>
> ---
> 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.

Show 5 quoted lines
> +       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.

Show 6 quoted lines
> +               <<<<<<< 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.

Previous: Elijah Newren via GitGitGadgetNext: Elijah Newren via GitGitGadget
Message 3 of 6 in “t6024: modernize style”
  1. 0/1 t6024: modernize styleElijah Newren via GitGitGadget, Nov 5, 2019
  2. 1/1 t6024: modernize styleElijah Newren via GitGitGadget, Nov 5, 2019
  3. Eric SunshineNov 6, 2019
  4. 0/1 t6024: modernize styleElijah Newren via GitGitGadget, Nov 6, 2019
  5. 1/1 t6024: modernize styleElijah Newren via GitGitGadget, Nov 6, 2019
  6. Junio C HamanoNov 7, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.