From: Jonathan Nieder <jrnieder@gmail.com>
To: Dmitry Ivankov <divanorama@gmail.com>
Cc: git@vger.kernel.org, "Shawn O. Pearce" <spearce@spearce.org>,
David Barr <davidbarr@google.com>
Subject: Re: [PATCH 2/2] fast-import: treat cat-blob as a delta base hint for next blob
Date: Sat, 20 Aug 2011 14:17:55 -0500 [thread overview]
Message-ID: <20110820191754.GA22833@elie.gateway.2wire.net> (raw)
In-Reply-To: <1313867052-11993-3-git-send-email-divanorama@gmail.com>
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>
next prev parent reply other threads:[~2011-08-20 19:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-20 19:04 [PATCH 0/2] fast-import: improve deltas for blobs Dmitry Ivankov
2011-08-20 19:04 ` [PATCH 1/2] fast-import: count and report # of calls to diff_delta in stats Dmitry Ivankov
2011-08-20 19:04 ` [PATCH 2/2] fast-import: treat cat-blob as a delta base hint for next blob Dmitry Ivankov
2011-08-20 19:17 ` Jonathan Nieder [this message]
2011-08-21 11:01 ` David Michael Barr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110820191754.GA22833@elie.gateway.2wire.net \
--to=jrnieder@gmail.com \
--cc=davidbarr@google.com \
--cc=divanorama@gmail.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).