summaryrefslogtreecommitdiff
path: root/cache-tree.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-01-29 20:47:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-29 20:47:56 (GMT)
commit371820d5f1bb3c3e691ad21cee652c02c36ea758 (patch)
treead479bc8fd4e4c59c93807fe47355ef6fccf68e5 /cache-tree.c
parenta6e3839976ed6328fccc83848c4f7c59d301edee (diff)
parent974e4a85e354d07fb4d50ff908713ecd5bcd4fff (diff)
downloadgit-371820d5f1bb3c3e691ad21cee652c02c36ea758.zip
git-371820d5f1bb3c3e691ad21cee652c02c36ea758.tar.gz
git-371820d5f1bb3c3e691ad21cee652c02c36ea758.tar.bz2
Merge branch 'bc/tree-walk-oid'
The code to walk tree objects has been taught that we may be working with object names that are not computed with SHA-1. * bc/tree-walk-oid: cache: make oidcpy always copy GIT_MAX_RAWSZ bytes tree-walk: store object_id in a separate member match-trees: use hashcpy to splice trees match-trees: compute buffer offset correctly when splicing tree-walk: copy object ID before use
Diffstat (limited to 'cache-tree.c')
-rw-r--r--cache-tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cache-tree.c b/cache-tree.c
index eabb8fb..c4b8a1f 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -675,7 +675,7 @@ static void prime_cache_tree_rec(struct repository *r,
cnt++;
else {
struct cache_tree_sub *sub;
- struct tree *subtree = lookup_tree(r, entry.oid);
+ struct tree *subtree = lookup_tree(r, &entry.oid);
if (!subtree->object.parsed)
parse_tree(subtree);
sub = cache_tree_sub(it, entry.path);
@@ -724,7 +724,7 @@ int cache_tree_matches_traversal(struct cache_tree *root,
it = find_cache_tree_from_traversal(root, info);
it = cache_tree_find(it, ent->path);
- if (it && it->entry_count > 0 && oideq(ent->oid, &it->oid))
+ if (it && it->entry_count > 0 && oideq(&ent->oid, &it->oid))
return it->entry_count;
return 0;
}