diff --git a/builtin-read-tree.c b/builtin-read-tree.c
index 8da8acbb0a25f88073254e21936a6ad5c6d0cca4..c1867d2a0052ad797481f3d5f9aa544952ff251b 100644 (file)
--- a/builtin-read-tree.c
+++ b/builtin-read-tree.c
#include "unpack-trees.h"
#include "builtin.h"
-static struct object_list *trees = NULL;
+static struct object_list *trees;
static int list_tree(unsigned char *sha1)
{
struct name_entry entry;
int cnt;
- memcpy(it->sha1, tree->object.sha1, 20);
+ hashcpy(it->sha1, tree->object.sha1);
desc.buf = tree->buffer;
desc.size = tree->size;
cnt = 0;