summaryrefslogtreecommitdiff
path: root/tree-diff.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 /tree-diff.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 'tree-diff.c')
-rw-r--r--tree-diff.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tree-diff.c b/tree-diff.c
index 34ee3b1..e6d306f 100644
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -239,7 +239,7 @@ static struct combine_diff_path *emit_path(struct combine_diff_path *p,
DIFF_STATUS_ADDED;
if (tpi_valid) {
- oid_i = tp[i].entry.oid;
+ oid_i = &tp[i].entry.oid;
mode_i = tp[i].entry.mode;
}
else {
@@ -280,7 +280,7 @@ static struct combine_diff_path *emit_path(struct combine_diff_path *p,
/* same rule as in emitthis */
int tpi_valid = tp && !(tp[i].entry.mode & S_IFXMIN_NEQ);
- parents_oid[i] = tpi_valid ? tp[i].entry.oid : NULL;
+ parents_oid[i] = tpi_valid ? &tp[i].entry.oid : NULL;
}
strbuf_add(base, path, pathlen);
@@ -492,7 +492,7 @@ static struct combine_diff_path *ll_diff_tree_paths(
continue;
/* diff(t,pi) != ΓΈ */
- if (!oideq(t.entry.oid, tp[i].entry.oid) ||
+ if (!oideq(&t.entry.oid, &tp[i].entry.oid) ||
(t.entry.mode != tp[i].entry.mode))
continue;