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

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

 



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:
>
> > 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

Attachment: pgpZdch2RIAdY.pgp
Description: PGP signature


[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]