Pack-objects: properly initialize the depth value
authorNicolas Pitre <nico@cam.org>
Fri, 13 Jul 2007 02:27:12 +0000 (22:27 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 Jul 2007 03:11:41 +0000 (20:11 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-pack-objects.c

index a43d6040cad5077c811aab4555ef4d32c504aab9..5e9d1fd86ce5ee18dcb9ace9595b925f7630b6e8 100644 (file)
@@ -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)