Re: [PATCH v10 2/2] pull --rebase: add --[no-]autostash flag
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Mar 25, 2016, 16:37 UTC
- Message-ID
- <CAPig+cTzV5FT=BBFW6kTUqPG8=ZWXf+78Y-HG=pb2x_8h8he1g@mail.gmail.com>
- In-Reply-To
- <CAPig+cTH-3PqZFyP_R1FyTPKhRhbbLRDeYfv2TcVq=gq=ZpRcQ@mail.gmail.com>
On Fri, Mar 25, 2016 at 4:44 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 18 quoted lines
> On Fri, Mar 25, 2016 at 4:31 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:
>> for i in --autostash --no-autostash
>> do
>> test_expect_success "pull $i (without --rebase) is illegal" "
>> test_must_fail git pull $i . copy 2>actual &&
>> test_i18ngrep 'only valid with --rebase' actual
>> "
>> done
>>
>> Take special note of how use of double (") and single (') quotes
>> differ in this case from other tests since $i needs to be interpolated
>> into the test body.
>
> That's not accurate. Since $i will be visible when the test body is
> actually evaluated, it will work correctly even with the body
> single-quoted as usual (like all other tests), so swapping the quotes
> around like this is unnecessary (and Junio would prefer[1] they not be
> swapped).Junio pointed out to me privately that I forgot to mention explicitly that you would need to use double quotes for the test title to ensure that $i is interpolated, but the test body can continue using single quotes, as explained above.