OSDN Git Service

Git 2.11.2
[git-core/git.git] / tree.c
diff --git a/tree.c b/tree.c
index 0089e52..ce345c5 100644 (file)
--- a/tree.c
+++ b/tree.c
@@ -26,7 +26,7 @@ static int read_one_entry_opt(const unsigned char *sha1, const char *base, int b
        ce->ce_namelen = baselen + len;
        memcpy(ce->name, base, baselen);
        memcpy(ce->name + baselen, pathname, len+1);
-       hashcpy(ce->sha1, sha1);
+       hashcpy(ce->oid.hash, sha1);
        return add_cache_entry(ce, opt);
 }
 
@@ -180,8 +180,7 @@ int read_tree(struct tree *tree, int stage, struct pathspec *match)
         * Sort the cache entry -- we need to nuke the cache tree, though.
         */
        cache_tree_free(&active_cache_tree);
-       qsort(active_cache, active_nr, sizeof(active_cache[0]),
-             cmp_cache_name_compare);
+       QSORT(active_cache, active_nr, cmp_cache_name_compare);
        return 0;
 }