Re: [PATCH v3 7/8] branch.c: use 'ref-filter' APIs

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

 



On Mon, Aug 24, 2015 at 11:01 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Karthik Nayak <karthik.188@xxxxxxxxx> writes:
>
>>>>  test_expect_success 'git branch shows badly named ref' '
>>>>         cp .git/refs/heads/master .git/refs/heads/broken...ref &&
>>>>         test_when_finished "rm -f .git/refs/heads/broken...ref" &&
>>>> -       git branch >output &&
>>>> +       git branch 2>output &&
>>>>         grep -e "broken\.\.\.ref" output
>>>>  '
>>>
>>> Maybe the test could be renamed to 'git branch warns about badly named
>>> ref' and maybe you could also check that "broken\.\.\.ref" is not
>>> printed on stdout.
>>
>> The name change sounds reasonable, do we really need to check for it in the
>> stdout?
>
> I think Christian meant "we should check in both", i.e.
>
>         git branch >output 2>error &&
>         grep "broken\.\.\.ref" error &&
>         ! grep "broken\.\.\.ref" output
>
> or something like that.  That way, you are effectively specifying in
> the test that badly named refs must not be included in the output,
> so somebody who changes that in the future needs to justify why
> including them in the output is a good idea when updating the test.
>

Ah! okay, I get what you're saying. Should I reroll it? Or a squash in?

-- 
Regards,
Karthik Nayak
--
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]