git-svn: allow SVN:: lib users to track the root of the repository (again)
[gitweb.git] / builtin-read-tree.c
index 8da8acbb0a25f88073254e21936a6ad5c6d0cca4..c1867d2a0052ad797481f3d5f9aa544952ff251b 100644 (file)
@@ -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;