From c26022ea8f54649ed6b3b545dd3158907abe5d2c Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Tue, 30 May 2017 10:30:47 -0700 Subject: 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 Signed-off-by: Junio C Hamano --- diff-lib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'diff-lib.c') diff --git a/diff-lib.c b/diff-lib.c index 2c838aaf4..7984ff962 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, -- cgit v1.2.1