Re: [PATCH] rewrite finish_bulk_checkin() using strbuf

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

 



On Sat, Mar 1, 2014 at 4:33 PM, He Sun <sunheehnus@xxxxxxxxx> wrote:
> 2014-03-01 15:18 GMT+08:00 Faiz Kothari <faiz.off93@xxxxxxxxx>:
>> Hi,
>> Yup, at that position.
>> I don't know, but it failed a few tests on my machine related to bitmap.
>> Another thing to use would be strbuf_splice()
>
> Eric Sunshine<sunshine@xxxxxxxxxxxxxx> has came up with a more
> elegant way to finish this task. That's using strbuf_setlen() instead of
> strbuf_remove(). Because of the unstable network of this afternoon. The
> former email is sent without the above information.
> Sorry about it.
You mean first use strbuf_setlen() to reduce len and then add ".whatever" to it?
strbuf_splice can do strbuf_remove() and add string in one shot as per the doc.
If using strbuf_setlen() is still better, I'll implement using that :)

> I find out that you didn't attach strbuf_remove() in your finish_bulk_checkin().
> That may cause problems not only related to bitmap, because the input
> packname is different from the output packname..
>
I am not sure how that is causing the problem, because tests run just fine.
I'll still look into it. Thanks for pointing that out :)

Cheers,
Faiz
--
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]