Thread (15 messages) 15 messages, 4 authors, 2019-12-30

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

From: Eric Sunshine <hidden>
Date: 2019-12-27 20:20:42

On Fri, Dec 27, 2019 at 1:48 PM Derrick Stolee via GitGitGadget
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
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.)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help