diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-01-29 12:47:56 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-29 12:47:56 -0800 |
commit | 371820d5f1bb3c3e691ad21cee652c02c36ea758 (patch) | |
tree | ad479bc8fd4e4c59c93807fe47355ef6fccf68e5 /tree-diff.c | |
parent | a6e3839976ed6328fccc83848c4f7c59d301edee (diff) | |
parent | 974e4a85e354d07fb4d50ff908713ecd5bcd4fff (diff) | |
download | git-371820d5f1bb3c3e691ad21cee652c02c36ea758.tar.gz |
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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tree-diff.c b/tree-diff.c index 34ee3b13b8..e6d306f69f 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; |