From: Jacob Keller <jacob.keller@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Jacob Keller <jacob.e.keller@intel.com>,
Git mailing list <git@vger.kernel.org>,
Mark Strapetz <marc.strapetz@syntevo.com>,
Stefan Beller <sbeller@google.com>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v4 3/3] git: submodule honor -c credential.* from command line
Date: Fri, 26 Feb 2016 14:20:34 -0800 [thread overview]
Message-ID: <CA+P7+xqSZGAJD7ryvx2A2qM1wd0rKMmjT2tcBPann33sUUHGcA@mail.gmail.com> (raw)
In-Reply-To: <20160226220553.GA1835@sigill.intra.peff.net>
On Fri, Feb 26, 2016 at 2:05 PM, Jeff King <peff@peff.net> wrote:
> On Fri, Feb 26, 2016 at 11:18:48AM -0800, Jacob Keller wrote:
>
>> +test_expect_success 'sanitize-config keeps credential.helper' "
>> + git -c credential.helper=helper submodule--helper sanitize-config >actual &&
>> + cat >expect <<-EOF &&
>> + 'credential.helper=helper'
>> + EOF
>> + test_cmp expect actual
>> +"
>
> This can (and should) be "<<-\EOF", right?
>
Yes, I actually meant <<-\EOF but forgot while writing it.
> I happened to be writing a test with the exact same problem (embedded
> single-quotes) today, and realized we have another solution which is
> used elsewhere in the test suite:
>
> sq="'"
> test_expect_success '...' '
> echo "${sq}credential.helper=helper${sq}" >expect &&
> ...
> '
>
> that is slightly more verbose, but it does let us keep the main body
> inside single-quotes, without restoring to confusing backslash escaping.
>
I think I prefer the double quotes myself but will use this if people prefer?
> -Peff
next prev parent reply other threads:[~2016-02-26 22:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 19:18 [PATCH v4 1/3] t/lib-httpd: load mod_unixd Jacob Keller
2016-02-26 19:18 ` [PATCH v4 2/3] sumodule--helper: fix submodule--helper clone usage and check argc count Jacob Keller
2016-02-26 19:31 ` Stefan Beller
2016-02-26 22:08 ` Jacob Keller
2016-02-26 19:18 ` [PATCH v4 3/3] git: submodule honor -c credential.* from command line Jacob Keller
2016-02-26 22:05 ` Jeff King
2016-02-26 22:20 ` Jacob Keller [this message]
2016-02-27 0:01 ` Jacob Keller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+P7+xqSZGAJD7ryvx2A2qM1wd0rKMmjT2tcBPann33sUUHGcA@mail.gmail.com \
--to=jacob.keller@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jacob.e.keller@intel.com \
--cc=marc.strapetz@syntevo.com \
--cc=peff@peff.net \
--cc=sbeller@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).