From: Nicolas Pitre <nico@cam.org>
To: Junio C Hamano <junkio@cox.net>, Brian Downing <bdowning@lavos.net>
Cc: git@vger.kernel.org
Subject: [PATCH] forgot to clear the depth value
Date: Thu, 12 Jul 2007 22:27:12 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.0.999.0707122221240.32552@xanadu.home> (raw)
In-Reply-To: <20070713014502.GF19073@lavos.net>
Commit 5a235b5e was missing this little detail. Otherwise your pack
will explode.
Problem noted by Brian Downing.
Signed-off-by: Nicolas Pitre <nico@cam.org>
---
On Thu, 12 Jul 2007, Brian Downing wrote:
> On Thu, Jul 12, 2007 at 08:42:28PM -0500, Brian Downing wrote:
> > This patch breaks pack-objects pretty horribly:
> >
> > :; PATH=~/src/git:$PATH /usr/bin/time ~/src/git/git-repack -a -d -f
>
> [that's Git I'm repacking here]
>
> > :; ls -l .git/objects/pack
> > total 153916
> > -r--r--r-- 1 bdowning bdowning 1312136 2007-07-12 20:39 pack-9ac926ee1f5810c434707d3f816f5ad2cbd14668.idx
> > -r--r--r-- 1 bdowning bdowning 156130933 2007-07-12 20:39 pack-9ac926ee1f5810c434707d3f816f5ad2cbd14668.pack
Oooooops.
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index a43d604..5e9d1fd 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -1431,6 +1431,7 @@ static void free_unpacked(struct unpacked *n)
window_memory_usage -= n->entry->size;
}
n->entry = NULL;
+ n->depth = 0;
}
static void find_deltas(struct object_entry **list, int window, int depth)
next prev parent reply other threads:[~2007-07-13 2:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-12 21:07 [PATCH] reduce git-pack-objects memory usage a little more Nicolas Pitre
2007-07-13 1:42 ` Brian Downing
2007-07-13 1:45 ` Brian Downing
2007-07-13 2:27 ` Nicolas Pitre [this message]
2007-07-13 3:10 ` [PATCH] forgot to clear the depth value Junio C Hamano
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=alpine.LFD.0.999.0707122221240.32552@xanadu.home \
--to=nico@cam.org \
--cc=bdowning@lavos.net \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).