Re: [PATCH 1/3] '--missing' option for mktree: re-added strbuf_release(&p_uq), Updated man page

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

 



On Wed, May 13, 2009 at 11:04 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>>               path = strbuf_detach(&p_uq, NULL);
>> +             append_to_tree(mode, sha1, path);
>> +             strbuf_release(&p_uq);
>> +             return;
>>       }
>>       append_to_tree(mode, sha1, path);
>>  }
>
> Ehh, why?  detach already detaches the allocated buffer from strbuf and
> there is nothing to clean up by strbuf_release().
>
My bad. While re-basing my work to fe0bb5, the strbuf_release() call
went missing, but I didn't notice you had also changed:
-                       path = p_uq.buf;
+               path = strbuf_detach(&p_uq, NULL);
That is much nicer
--
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]