summaryrefslogtreecommitdiff
path: root/diff-lib.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-05-30 17:30:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-02 00:36:07 (GMT)
commitc26022ea8f54649ed6b3b545dd3158907abe5d2c (patch)
treea774987137bafa841a9eed9ce3248ef83a8167e0 /diff-lib.c
parentfcf2cfb54b6be34749feb6ffb50fe2bdd7bac8bc (diff)
downloadgit-c26022ea8f54649ed6b3b545dd3158907abe5d2c.zip
git-c26022ea8f54649ed6b3b545dd3158907abe5d2c.tar.gz
git-c26022ea8f54649ed6b3b545dd3158907abe5d2c.tar.bz2
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 'diff-lib.c')
-rw-r--r--diff-lib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/diff-lib.c b/diff-lib.c
index 2c838aa..7984ff9 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -210,14 +210,14 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
continue;
}
diff_addremove(&revs->diffopt, '-', ce->ce_mode,
- ce->oid.hash,
+ &ce->oid,
!is_null_oid(&ce->oid),
ce->name, 0);
continue;
} else if (revs->diffopt.ita_invisible_in_index &&
ce_intent_to_add(ce)) {
diff_addremove(&revs->diffopt, '+', ce->ce_mode,
- EMPTY_BLOB_SHA1_BIN, 0,
+ &empty_tree_oid, 0,
ce->name, 0);
continue;
}
@@ -260,7 +260,7 @@ static void diff_index_show_file(struct rev_info *revs,
unsigned dirty_submodule)
{
diff_addremove(&revs->diffopt, prefix[0], mode,
- oid->hash, oid_valid, ce->name, dirty_submodule);
+ oid, oid_valid, ce->name, dirty_submodule);
}
static int get_stat_data(const struct cache_entry *ce,