git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] rewrite finish_bulk_checkin() using strbuf

From
FKFaiz Kothari <faiz.off93@gmail.com>
Date
Mar 1, 2014, 11:20 UTC
Message-ID
<CAFbjVcnM8a9pOmkt1ERZ-5mxek6+uP5ZPabwz1EqBFxO=VCJVw@mail.gmail.com>
In-Reply-To
<CAJr59C2SpT_=-tDq1yQSt8j1TNy9vOugw-tusC=KBUnYfjYfeg@mail.gmail.com>
On Sat, Mar 1, 2014 at 4:33 PM, He Sun <sunheehnus@gmail.com> wrote:
Show 11 quoted lines
> 2014-03-01 15:18 GMT+08:00 Faiz Kothari <faiz.off93@gmail.com>:
>> 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@sunshineco.com> 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

Previous: He Sun
Message 5 of 5 in “rewrite finish_bulk_checkin() using strbuf”
  1. rewrite finish_bulk_checkin() using strbufFaiz Kothari, Mar 1, 2014
  2. He SunMar 1, 2014
  3. He SunMar 1, 2014
  4. He SunMar 1, 2014
  5. Faiz KothariMar 1, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.