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

Re: [PATCH] Rewrite bulk-checkin.c:finish_bulk_checkin() to use a strbuf for handling packname

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Feb 28, 2014, 20:47 UTC
Message-ID
<CAPig+cT8ziBV3w9gTR_GM=xupmJiZ=2hvizagk+SR3GY_wMGUw@mail.gmail.com>
In-Reply-To
<CAJr59C1ezbeG5+x2VHCnxbfATXgVO1gq9+b3amgvKUqZa0Swkg@mail.gmail.com>
On Fri, Feb 28, 2014 at 10:54 AM, 孙赫 <sunheehnus@gmail.com> wrote:
Show 35 quoted lines
> 2014-02-28 17:47 GMT+08:00 Eric Sunshine [via git]
> <ml-node+s661346n7604473h64@n2.nabble.com>:
>> On Fri, Feb 28, 2014 at 3:28 AM, Sun He <[hidden email]> wrote:
>>> Signed-off-by: Sun He <[hidden email]>
>>> ---
>> > diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
>>
>>> index c733379..72fb82b 100644
>>> --- a/builtin/pack-objects.c
>>> +++ b/builtin/pack-objects.c
>>> @@ -803,7 +803,7 @@ static void write_pack_file(void)
>>>
>>>                 if (!pack_to_stdout) {
>>>                         struct stat st;
>>> -                       char tmpname[PATH_MAX];
>>> +                       struct strbuf tmpname = STRBUF_INIT;
>>>
>>>                         /*
>>>                          * Packs are runtime accessed in their mtime
>>> @@ -823,26 +823,22 @@ static void write_pack_file(void)
>>>                                 utb.modtime = --last_mtime;
>>>                                 if (utime(pack_tmp_name, &utb) < 0)
>>>                                         warning("failed utime() on %s:
>>> %s",
>>> -                                               tmpname, strerror(errno));
>>> +                                               pack_tmp_name,
>>> strerror(errno));
>>
>> Good catch finding this bug (as your commentary below states).
>> Ideally, each conceptual change should be presented distinctly from
>> others, so this bug should have its own patch (even though it's just a
>> one-liner).
>>
>
> OK. Should I send this patch?

Yes, it is perfectly acceptable (and encouraged) to send this patch as a submission distinct from your microproject.

Previous: 孙赫
Message 8 of 8 in “Rewrite bulk-checkin.c:finish_bulk_checkin() to use a strbuf for handling packname”
  1. Rewrite bulk-checkin.c:finish_bulk_checkin() to use a strbuf for handling packnameSun He, Feb 28, 2014
  2. Eric SunshineFeb 28, 2014
  3. Eric SunshineFeb 28, 2014
  4. 孙赫Feb 28, 2014
  5. Eric SunshineFeb 28, 2014
  6. He SunMar 1, 2014
  7. Fwd: [PATCH] Rewrite bulk-checkin.c:finish_bulk_checkin() to use a strbuf for handling packname孙赫, Feb 28, 2014
  8. Eric SunshineFeb 28, 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.