From 944cffbd18a7dbe0b4c5849da6f093c41b49ea00 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Sat, 6 May 2017 22:10:35 +0000 Subject: diff-lib: convert do_diff_cache to struct object_id This is needed to convert parse_tree_indirect. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- builtin/am.c | 2 +- builtin/blame.c | 6 +++--- builtin/reset.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'builtin') diff --git a/builtin/am.c b/builtin/am.c index 642d7047d9..200d9dbed4 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -1145,7 +1145,7 @@ static int index_has_changes(struct strbuf *sb) DIFF_OPT_SET(&opt, EXIT_WITH_STATUS); if (!sb) DIFF_OPT_SET(&opt, QUICK); - do_diff_cache(head.hash, &opt); + do_diff_cache(&head, &opt); diffcore_std(&opt); for (i = 0; sb && i < diff_queued_diff.nr; i++) { if (i) diff --git a/builtin/blame.c b/builtin/blame.c index 58bb274d02..e920314a74 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -563,7 +563,7 @@ static struct origin *find_origin(struct scoreboard *sb, diff_setup_done(&diff_opts); if (is_null_oid(&origin->commit->object.oid)) - do_diff_cache(parent->tree->object.oid.hash, &diff_opts); + do_diff_cache(&parent->tree->object.oid, &diff_opts); else diff_tree_sha1(parent->tree->object.oid.hash, origin->commit->tree->object.oid.hash, @@ -633,7 +633,7 @@ static struct origin *find_rename(struct scoreboard *sb, diff_setup_done(&diff_opts); if (is_null_oid(&origin->commit->object.oid)) - do_diff_cache(parent->tree->object.oid.hash, &diff_opts); + do_diff_cache(&parent->tree->object.oid, &diff_opts); else diff_tree_sha1(parent->tree->object.oid.hash, origin->commit->tree->object.oid.hash, @@ -1272,7 +1272,7 @@ static void find_copy_in_parent(struct scoreboard *sb, DIFF_OPT_SET(&diff_opts, FIND_COPIES_HARDER); if (is_null_oid(&target->commit->object.oid)) - do_diff_cache(parent->tree->object.oid.hash, &diff_opts); + do_diff_cache(&parent->tree->object.oid, &diff_opts); else diff_tree_sha1(parent->tree->object.oid.hash, target->commit->tree->object.oid.hash, diff --git a/builtin/reset.c b/builtin/reset.c index 0be52fa36a..3415dac5d5 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -154,7 +154,7 @@ static int read_from_tree(const struct pathspec *pathspec, opt.format_callback = update_index_from_diff; opt.format_callback_data = &intent_to_add; - if (do_diff_cache(tree_oid->hash, &opt)) + if (do_diff_cache(tree_oid, &opt)) return 1; diffcore_std(&opt); diff_flush(&opt); -- cgit v1.2.3