Re: [PATCH 2/2] fast-import: treat cat-blob as a delta base hint for next blob
Show 14 quoted lines
> --- 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>