Thread (17 messages) flat view 17 messages, 4 authors, 2016-06-15

Re: [PATCH v5 2/4] commit test: Use write_script

From: Caleb Thompson <hidden>
Date: 2016-06-15 23:01:37

You're very right - I may have confused this commit message and the one
to switch to test_set_editor. I'll rewrite this commit message.

What do you think of something like this for the description:

    Use write_script from t/test-lib-functions.sh instead of cat,
    shebang, and chmod. This aids in readability for creating the script
    by using the named function and allows us to turn off interpolation
    in the heredoc of the script body to avoid extra escaping, since
    $SHELL_PATH is handled for us.

On Fri, Jun 13, 2014 at 02:50:37AM -0400, Jeff King wrote:
On Thu, Jun 12, 2014 at 02:39:00PM -0500, Caleb Thompson wrote:
quoted
Use write_script from t/test-lib-functions.sh instead of cat, shebang,
and chmod. This protects us from potential shell meta-characters in the
name of our trash directory, which would be interpreted if we set
$EDITOR directly.
I'm not sure about this last sentence; isn't that what test_set_editor
is doing, which was already there? I think the real rationale is
readability: since $SHELL_PATH is handled for us, you can turn off
interpolation in the here-doc containing the helper script. That avoids
an extra layer of quoting.

-Peff

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help