Re: [PATCH 7/9] ref-filter: make %(upstream:track) prints "[gone]" for invalid upstreams
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Oct 5, 2015, 07:49 UTC
- Message-ID
- <CAOLa=ZRF6tVg6DSjXZb65pJz_D5_H5aix7JFx9pSW49iyFN+iQ@mail.gmail.com>
- In-Reply-To
- <vpqio6o9mu1.fsf@grenoble-inp.fr>
On Sat, Oct 3, 2015 at 5:38 PM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:
Show 16 quoted lines
> Karthik Nayak <karthik.188@gmail.com> writes:
>
>> diff --git a/ref-filter.c b/ref-filter.c
>> index 099acd6..48b06e3 100644
>> --- a/ref-filter.c
>> +++ b/ref-filter.c
>> @@ -1133,8 +1133,10 @@ static void populate_value(struct ref_array_item *ref)
>> char buf[40];
>>
>> if (stat_tracking_info(branch, &num_ours,
>> - &num_theirs, NULL))
>> + &num_theirs, NULL)) {
>> + v->s = xstrdup("[gone]");
>
> I think just "[gone]" without the xstrdup is OK, and avoids leaking one
> string.Will do.
-- Regards, Karthik Nayak