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

Re: [PATCH 2/2] fast-import: treat cat-blob as a delta base hint for next blob

From
David Michael Barr <davidbarr@google.com>
Date
Aug 21, 2011, 11:01 UTC
Message-ID
<CAFfmPPNOdCAZxtVHx3Px+ACad4fCdL2Op+3sezf14EMSBqwiJg@mail.gmail.com>
In-Reply-To
<20110820191754.GA22833@elie.gateway.2wire.net>
On Sun, Aug 21, 2011 at 5:17 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 20 quoted lines
> Dmitry Ivankov wrote:
>
>> --- a/fast-import.c
>> +++ b/fast-import.c
>> @@ -2802,7 +2802,12 @@ static void cat_blob(struct object_entry *oe, unsigned char sha1[20])
>>       strbuf_release(&line);
>>       cat_blob_write(buf, size);
>>       cat_blob_write("\n", 1);
>> -     free(buf);
>> +     if (oe && oe->pack_id == pack_id) {
>> +             strbuf_attach(&last_blob.data, buf, size, size);
>> +             last_blob.offset = oe->idx.offset;
>> +             last_blob.depth = oe->depth;
>> +     } else
>> +             free(buf);
>>  }
>
> Neat.  For what it's worth,
> Acked-by: Jonathan Nieder <jrnieder@gmail.com>
>
Brilliant!
Acked-by: David Barr <davidbarr@google.com>
Previous: Jonathan Nieder
Message 5 of 5 in “fast-import: improve deltas for blobs”
  1. 0/2 fast-import: improve deltas for blobsDmitry Ivankov, Aug 20, 2011
  2. 1/2 fast-import: count and report # of calls to diff_delta in statsDmitry Ivankov, Aug 20, 2011
  3. 2/2 fast-import: treat cat-blob as a delta base hint for next blobDmitry Ivankov, Aug 20, 2011
  4. Jonathan NiederAug 20, 2011
  5. David Michael BarrAug 21, 2011

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.