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

Re: [PATCH v2 2/2] sparse-checkout: document interactions with submodules

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Dec 27, 2019, 20:20 UTC
Message-ID
<CAPig+cTvFW_84TqKsOPjjBM37cX1OL9uX15APcEYpuKVjvM+dg@mail.gmail.com>
In-Reply-To
<331bb7d6fbec6f2f429feb36cf32e0931307ae0b.1577472469.git.gitgitgadget@gmail.com>

On Fri, Dec 27, 2019 at 1:48 PM Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com> wrote:

Show 9 quoted lines
> diff --git a/t/t1091-sparse-checkout-builtin.sh b/t/t1091-sparse-checkout-builtin.sh
> @@ -340,4 +340,32 @@ test_expect_success 'cone mode: set with core.ignoreCase=true' '
> +test_expect_success 'interaction with submodules' '
> +       ...
> +       cat >expect <<-EOF &&
> +               a
> +               folder1
> +               modules
> +       EOF

You would normally use \-EOF rather than -EOF to make it clear that no interpolation is needed/expected within the here-doc body. However, this script is already full of -EOF when \-EOF ought to be used, so being consistent with existing tests may override an objection.

Likewise, please note for future reference that the usual way here-docs are formatted in Git test scripts is to indent the body of the here-doc to the same level as the command which opens it. That is:

    cat >expect <<\-EOF &&
    a
    folder1
    modules
    EOF

But, again, this script is already full of these malformatted here-docs, so maintaining consistency with the existing test in the script is probably okay.

(Of course, a preparatory patch fixing these here-doc issues would be welcome, but might also be outside the scope of this submission. And, fixing these very minor issues is quite low-priority, so I wouldn't expect or demand it.)

Previous: Derrick Stolee via GitGitGadgetNext: Derrick Stolee
Message 10 of 18 in “sparse-checkout: list directories in cone mode”
  1. 0/1 sparse-checkout: list directories in cone modeDerrick Stolee via GitGitGadget, Dec 26, 2019
  2. 1/1 sparse-checkout: list folders in cone modeDerrick Stolee via GitGitGadget, Dec 26, 2019
  3. Junio C HamanoDec 26, 2019
  4. Derrick StoleeDec 27, 2019
  5. Elijah NewrenDec 27, 2019
  6. 0/2 sparse-checkout: list directories in cone modeDerrick Stolee via GitGitGadget, Dec 27, 2019
  7. 1/2 sparse-checkout: list folders in cone modeDerrick Stolee via GitGitGadget, Dec 27, 2019
  8. Elijah NewrenDec 27, 2019
  9. 2/2 sparse-checkout: document interactions with submodulesDerrick Stolee via GitGitGadget, Dec 27, 2019
  10. Eric SunshineDec 27, 2019
  11. Derrick StoleeDec 30, 2019
  12. Elijah NewrenDec 27, 2019
  13. Junio C HamanoDec 27, 2019
  14. 0/2 sparse-checkout: list directories in cone modeDerrick Stolee via GitGitGadget, Dec 30, 2019
  15. 1/2 sparse-checkout: list directories in cone modeDerrick Stolee via GitGitGadget, Dec 30, 2019
  16. 2/2 sparse-checkout: document interactions with submodulesDerrick Stolee via GitGitGadget, Dec 30, 2019
  17. Elijah NewrenDec 30, 2019
  18. Elijah NewrenDec 27, 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.