Re: [PATCH v4 3/3] git: submodule honor -c credential.* from command line

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

 



On Fri, Feb 26, 2016 at 2:05 PM, Jeff King <peff@xxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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