summaryrefslogtreecommitdiff
path: root/tree-diff.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-05-30 10:30:47 -0700
committerJunio C Hamano <gitster@pobox.com>2017-06-02 09:36:07 +0900
commitc26022ea8f54649ed6b3b545dd3158907abe5d2c (patch)
treea774987137bafa841a9eed9ce3248ef83a8167e0 /tree-diff.c
parentfcf2cfb54b6be34749feb6ffb50fe2bdd7bac8bc (diff)
downloadgit-c26022ea8f54649ed6b3b545dd3158907abe5d2c.tar.gz
diff: convert diff_addremove to struct object_id
Convert diff_addremove to take a struct object_id. In addtion convert the function pointer type 'add_remove_fn_t' to also take a struct object_id. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tree-diff.c')
-rw-r--r--tree-diff.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tree-diff.c b/tree-diff.c
index e164e532b2..f2c747ea50 100644
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -78,21 +78,21 @@ static int emit_diff_first_parent_only(struct diff_options *opt, struct combine_
1, 1, p->path, 0, 0);
}
else {
- const unsigned char *sha1;
+ const struct object_id *oid;
unsigned int mode;
int addremove;
if (p->mode) {
addremove = '+';
- sha1 = p->oid.hash;
+ oid = &p->oid;
mode = p->mode;
} else {
addremove = '-';
- sha1 = p0->oid.hash;
+ oid = &p0->oid;
mode = p0->mode;
}
- opt->add_remove(opt, addremove, mode, sha1, 1, p->path, 0);
+ opt->add_remove(opt, addremove, mode, oid, 1, p->path, 0);
}
return 0; /* we are done with p */