git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[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)
Previous: Brian DowningNext: Junio C Hamano
Message 4 of 5 in “reduce git-pack-objects memory usage a little more”
  1. reduce git-pack-objects memory usage a little moreNicolas Pitre, Jul 12, 2007
  2. Brian DowningJul 13, 2007
  3. Brian DowningJul 13, 2007
  4. forgot to clear the depth valueNicolas Pitre, Jul 13, 2007
  5. Junio C HamanoJul 13, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.