Re: [PATCH v16 00/14] port tag.c to use ref-filter APIs
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Sep 8, 2015, 05:43 UTC
- Message-ID
- <CAOLa=ZTwV3O9LVKqU3zXaqt=HoF1HxAGoMW2PLuj_y9iydRUwQ@mail.gmail.com>
- In-Reply-To
- <vpqfv2qqq7y.fsf@scolette.imag.fr>
On Mon, Sep 7, 2015 at 7:35 PM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:
Show 30 quoted lines
> Karthik Nayak <karthik.188@gmail.com> writes:
>
>> On Mon, Sep 7, 2015 at 12:03 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>>> diff --git a/builtin/tag.c b/builtin/tag.c
>>>> index 9fa1400..f55dfda 100644
>>>> --- a/builtin/tag.c
>>>> +++ b/builtin/tag.c
>>>> @@ -43,8 +43,8 @@ static int list_tags(struct ref_filter *filter, struct ref_sorting *sorting, con
>>>>
>>>> if (!format) {
>>>> if (filter->lines)
>>>> - format = to_free = xstrfmt("%%(align:15,left)%%(refname:short)%%(end) %%(contents:lines=%d)",
>>>> - filter->lines);
>>>> + format = to_free = xstrfmt("%%(align:15,left)%%(refname:short)%%(end) "
>>>> + "%%(contents:lines=%d)", filter->lines);
>>>
>>> This line still looks overlong. Would it help to stop spelling this
>>> as a double "a = b = overlong expression" assignment?
>>>
>>
>> I'm not sure, I get what you mean.
>
> I guess
>
> format = xstrfmt("%%(align:15,left)%%(refname:short)%%(end) %%(contents:lines=%d)",
> filter->lines);
> to_free = format;
>
> (still 83 columns + indentation, but that's a bit shorter than your
> version).Also we could drop left, its default anyways.
-- Regards, Karthik Nayak