Re: [PATCH v7 3/5] bisect: simplify the addition of new bisect terms

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

 



Eric Sunshine <sunshine@xxxxxxxxxxxxxx> writes:

> On Tue, Jun 23, 2015 at 8:54 AM, Matthieu Moy <Matthieu.Moy@xxxxxxx> wrote:

>> +       strbuf_addstr(&bisect_refs_buf, "refs/bisect/");
>> +       strbuf_addstr(&bisect_refs_buf, name_bad);
>
> A single strbuf_addf() rather than two strbuf_addstr()s?

>> +       bisect_refs_str = strbuf_detach(&bisect_refs_buf, NULL);
>> +       status = for_each_ref_in_submodule(submodule, bisect_refs_str, fn, cb_data);
>> +       free((char *)bisect_refs_str);
>
> Why the above rather than the simpler?
>
>     strbuf_addstr(&bisect_refs, ...);
>     status = for_each_ref_in_submodule(submodule, bisect_refs.buf, fn, cb_data);
>     strbuf_release(&bisect_refs);
>
> What am I missing?

Indeed, your version is much better.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
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]