diff options
Diffstat (limited to 'tree.c')
-rw-r--r-- | tree.c | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -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); } @@ -76,7 +76,7 @@ static int read_tree_1(struct tree *tree, struct strbuf *base, continue; } - switch (fn(entry.sha1, base, + switch (fn(entry.oid->hash, base, entry.path, entry.mode, stage, context)) { case 0: continue; @@ -87,19 +87,19 @@ static int read_tree_1(struct tree *tree, struct strbuf *base, } if (S_ISDIR(entry.mode)) - hashcpy(sha1, entry.sha1); + hashcpy(sha1, entry.oid->hash); else if (S_ISGITLINK(entry.mode)) { struct commit *commit; - commit = lookup_commit(entry.sha1); + commit = lookup_commit(entry.oid->hash); if (!commit) die("Commit %s in submodule path %s%s not found", - sha1_to_hex(entry.sha1), + oid_to_hex(entry.oid), base->buf, entry.path); if (parse_commit(commit)) die("Invalid commit %s in submodule path %s%s", - sha1_to_hex(entry.sha1), + oid_to_hex(entry.oid), base->buf, entry.path); hashcpy(sha1, commit->tree->object.oid.hash); @@ -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; } |