aboutsummaryrefslogtreecommitdiff
path: root/builtin-read-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-read-tree.c')
-rw-r--r--builtin-read-tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-read-tree.c b/builtin-read-tree.c
index 8da8acbb0..c1867d2a0 100644
--- a/builtin-read-tree.c
+++ b/builtin-read-tree.c
@@ -12,7 +12,7 @@
#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)
{
@@ -53,7 +53,7 @@ static void prime_cache_tree_rec(struct cache_tree *it, struct tree *tree)
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;