summaryrefslogtreecommitdiff
path: root/builtin-read-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-read-tree.c')
-rw-r--r--builtin-read-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-read-tree.c b/builtin-read-tree.c
index 53087faf7a..c1867d2a00 100644
--- a/builtin-read-tree.c
+++ b/builtin-read-tree.c
@@ -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;