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

Re: [PATCH v3] builtin/apply: handle parse_binary() failure

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 1, 2016, 17:16 UTC
Message-ID
<xmqqvb41i705.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAP8UFD2vx17KDf5HgSYYZudbXiq7CYDg0=hXbJuJrLp9QDfJUg@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
Show 22 quoted lines
> On Fri, Mar 18, 2016 at 1:30 PM, Christian Couder
> <christian.couder@gmail.com> wrote:
>> In parse_binary() there is:
>>
>>         forward = parse_binary_hunk(&buffer, &size, &status, &used);
>>         if (!forward && !status)
>>                 /* there has to be one hunk (forward hunk) */
>>                 return error(_("unrecognized binary patch at line %d"), linenr-1);
>>
>> so parse_binary() can return -1, because that's what error() returns.
>>
>> Also parse_binary_hunk() sets "status" to -1 in case of error and
>> parse_binary() does "if (status) return status;".
>>
>> In this case parse_chunk() should not add -1 to the patchsize it computes.
>> It is better for future libification efforts to make it just return -1.
>>
>> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
>> ---
>> Only the title of the patch changed in this version compared to v2.
>
> It looks like this patch is not in pu. Maybe it has fallen through the cracks?

Yup, it indeed was ignored (giving priority to work towards 2.8 during the freeze) and then was forgotten.

My comment on the first one that exited mentions "your follow-up patch", but I cannot quite tell which one, as there was no threading in your original patches. Does this change need to come before something else that I already have?

Previous: Christian CouderNext: Christian Couder
Message 3 of 4 in “builtin/apply: handle parse_binary() failure”
  1. builtin/apply: handle parse_binary() failureChristian Couder, Mar 18, 2016
  2. Christian CouderMar 31, 2016
  3. Junio C HamanoApr 1, 2016
  4. Christian CouderApr 1, 2016

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.