Code

Account for tree entry memory costs in fast-import.
[git.git] / unpack-trees.c
index 43ed12484f6eb8bb828987872b2782182e579b9f..3ac0289b3a3309fca9ade4e271dbd8b0d2f148ea 100644 (file)
@@ -200,7 +200,7 @@ static int unpack_trees_rec(struct tree_entry_list **posns, int len,
 
                        any_files = 1;
 
-                       memcpy(ce->sha1, posns[i]->sha1, 20);
+                       hashcpy(ce->sha1, posns[i]->sha1);
                        src[i + o->merge] = ce;
                        subposns[i] = df_conflict_list;
                        posns[i] = posns[i]->next;
@@ -417,7 +417,7 @@ static int same(struct cache_entry *a, struct cache_entry *b)
        if (!a && !b)
                return 1;
        return a->ce_mode == b->ce_mode &&
-               !memcmp(a->sha1, b->sha1, 20);
+              !hashcmp(a->sha1, b->sha1);
 }