Re: [PATCH v7 09/17] ref-filter: make "%(symref)" atom work with the ':short' modifier

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

 



On Sat, Nov 19, 2016 at 3:04 AM, Jakub Narębski <jnareb@xxxxxxxxx> wrote:
> W dniu 08.11.2016 o 21:12, Karthik Nayak pisze:
>>
>> Helped-by: Junio C Hamano <gitster@xxxxxxxxx>
>> Signed-off-by: Karthik Nayak <Karthik.188@xxxxxxxxx>
>> ---
> [...]
>
>> +test_expect_success 'Add symbolic ref for the following tests' '
>> +     git symbolic-ref refs/heads/sym refs/heads/master
>> +'
>> +
>> +cat >expected <<EOF
>> +refs/heads/master
>> +EOF
>
> This should be inside the relevant test, not outside.  In other
> patches in this series you are putting setup together with the
> rest of test, by using "cat >expected <<-\EOF".
>

Ah! That's because I was just trying to keep it consistent. These tests
are added to t6300, where the `expected` block is usually outside the tests
themselves.

The other tests in the series are added to t6302, where we keep the `expected`
block within the tests themselves.

>> +
>> +test_expect_success 'Verify usage of %(symref) atom' '
>> +     git for-each-ref --format="%(symref)" refs/heads/sym > actual &&
>
> This should be spelled " >actual", rather than " > actual"; there
> should be no space between redirection and file name.
>
>> +     test_cmp expected actual
>> +'
>> +
>> +cat >expected <<EOF
>> +heads/master
>> +EOF
>> +
>> +test_expect_success 'Verify usage of %(symref:short) atom' '
>> +     git for-each-ref --format="%(symref:short)" refs/heads/sym > actual &&
>> +     test_cmp expected actual
>> +'
>
> Same here.
>

Will remove the space between '>' and 'actual', Thanks.

-- 
Regards,
Karthik Nayak




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