[PATCH] forgot to clear the depth value
- From
Nicolas Pitre <nico@cam.org>
- Date
- Jul 13, 2007, 02:27 UTC
- Message-ID
- <alpine.LFD.0.999.0707122221240.32552@xanadu.home>
- 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:
Show 11 quoted lines
> 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)