From: bdowning@lavos.net (Brian Downing)
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] Don't allow fast-import tree delta chains to exceed maximum depth
Date: Tue, 13 Nov 2007 23:45:24 -0600 [thread overview]
Message-ID: <20071114054524.GV6212@lavos.net> (raw)
In-Reply-To: <20071114044842.GA6876@spearce.org>
On Tue, Nov 13, 2007 at 11:48:42PM -0500, Shawn O. Pearce wrote:
> @@ -1105,7 +1108,7 @@ static int store_object(
> unsigned pos = sizeof(hdr) - 1;
>
> delta_count_by_type[type]++;
> - last->depth++;
> + e->depth = ++last->depth++;
>
> hdrlen = encode_header(OBJ_OFS_DELTA, deltalen, hdr);
> write_or_die(pack_data->pack_fd, hdr, hdrlen);
I'm not sure, but I think that's too many ++'s.
The earlier patch had:
@@ -1084,6 +1087,7 @@ static int store_object(
delta_count_by_type[type]++;
last->depth++;
+ e->depth = last->depth;
hdrlen = encode_header(OBJ_OFS_DELTA, deltalen, hdr);
write_or_die(pack_data->pack_fd, hdr, hdrlen);
Which of course would be the equivalent of:
> + e->depth = ++last->depth;
Maybe there's some cleverness here I'm missing, though.
-bcd
next prev parent reply other threads:[~2007-11-14 5:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-14 4:48 [PATCH] Don't allow fast-import tree delta chains to exceed maximum depth Shawn O. Pearce
2007-11-14 5:45 ` Brian Downing [this message]
2007-11-14 5:46 ` Junio C Hamano
2007-11-14 5:54 ` Shawn O. Pearce
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=20071114054524.GV6212@lavos.net \
--to=bdowning@lavos.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.