summaryrefslogtreecommitdiff
path: root/diff-lib.c
diff options
context:
space:
mode:
authorLibravatar Brandon Williams <bmwill@google.com>2017-05-30 10:30:47 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-06-02 09:36:07 +0900
commitc26022ea8f54649ed6b3b545dd3158907abe5d2c (patch)
treea774987137bafa841a9eed9ce3248ef83a8167e0 /diff-lib.c
parentdiff: convert diff_index_show_file to struct object_id (diff)
downloadtgif-c26022ea8f54649ed6b3b545dd3158907abe5d2c.tar.xz
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 2c838aaf43..7984ff962f 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,