diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/blame.c | 20 | ||||
-rw-r--r-- | builtin/diff-tree.c | 8 | ||||
-rw-r--r-- | builtin/diff.c | 2 | ||||
-rw-r--r-- | builtin/fast-export.c | 4 | ||||
-rw-r--r-- | builtin/log.c | 6 | ||||
-rw-r--r-- | builtin/merge.c | 2 |
6 files changed, 20 insertions, 22 deletions
diff --git a/builtin/blame.c b/builtin/blame.c index 5ad435380f..7645aa991d 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -565,9 +565,9 @@ static struct origin *find_origin(struct scoreboard *sb, if (is_null_oid(&origin->commit->object.oid)) do_diff_cache(&parent->tree->object.oid, &diff_opts); else - diff_tree_sha1(parent->tree->object.oid.hash, - origin->commit->tree->object.oid.hash, - "", &diff_opts); + diff_tree_oid(&parent->tree->object.oid, + &origin->commit->tree->object.oid, + "", &diff_opts); diffcore_std(&diff_opts); if (!diff_queued_diff.nr) { @@ -635,9 +635,9 @@ static struct origin *find_rename(struct scoreboard *sb, if (is_null_oid(&origin->commit->object.oid)) do_diff_cache(&parent->tree->object.oid, &diff_opts); else - diff_tree_sha1(parent->tree->object.oid.hash, - origin->commit->tree->object.oid.hash, - "", &diff_opts); + diff_tree_oid(&parent->tree->object.oid, + &origin->commit->tree->object.oid, + "", &diff_opts); diffcore_std(&diff_opts); for (i = 0; i < diff_queued_diff.nr; i++) { @@ -1262,7 +1262,7 @@ static void find_copy_in_parent(struct scoreboard *sb, /* Try "find copies harder" on new path if requested; * we do not want to use diffcore_rename() actually to * match things up; find_copies_harder is set only to - * force diff_tree_sha1() to feed all filepairs to diff_queue, + * force diff_tree_oid() to feed all filepairs to diff_queue, * and this code needs to be after diff_setup_done(), which * usually makes find-copies-harder imply copy detection. */ @@ -1274,9 +1274,9 @@ static void find_copy_in_parent(struct scoreboard *sb, if (is_null_oid(&target->commit->object.oid)) 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_opts); + diff_tree_oid(&parent->tree->object.oid, + &target->commit->tree->object.oid, + "", &diff_opts); if (!DIFF_OPT_TST(&diff_opts, FIND_COPIES_HARDER)) diffcore_std(&diff_opts); diff --git a/builtin/diff-tree.c b/builtin/diff-tree.c index 5ea1c14317..aef1676198 100644 --- a/builtin/diff-tree.c +++ b/builtin/diff-tree.c @@ -49,8 +49,8 @@ static int stdin_diff_trees(struct tree *tree1, const char *p) return -1; printf("%s %s\n", oid_to_hex(&tree1->object.oid), oid_to_hex(&tree2->object.oid)); - diff_tree_sha1(tree1->object.oid.hash, tree2->object.oid.hash, - "", &log_tree_opt.diffopt); + diff_tree_oid(&tree1->object.oid, &tree2->object.oid, + "", &log_tree_opt.diffopt); log_tree_diff_flush(&log_tree_opt); return 0; } @@ -148,9 +148,7 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix) if (tree2->flags & UNINTERESTING) { SWAP(tree2, tree1); } - diff_tree_sha1(tree1->oid.hash, - tree2->oid.hash, - "", &opt->diffopt); + diff_tree_oid(&tree1->oid, &tree2->oid, "", &opt->diffopt); log_tree_diff_flush(opt); break; } diff --git a/builtin/diff.c b/builtin/diff.c index 73b4ff3db2..4c6a1a962f 100644 --- a/builtin/diff.c +++ b/builtin/diff.c @@ -174,7 +174,7 @@ static int builtin_diff_tree(struct rev_info *revs, swap = 1; oid[swap] = &ent0->item->oid; oid[1 - swap] = &ent1->item->oid; - diff_tree_sha1(oid[0]->hash, oid[1]->hash, "", &revs->diffopt); + diff_tree_oid(oid[0], oid[1], "", &revs->diffopt); log_tree_diff_flush(revs); return 0; } diff --git a/builtin/fast-export.c b/builtin/fast-export.c index e242726f08..d57f36c438 100644 --- a/builtin/fast-export.c +++ b/builtin/fast-export.c @@ -562,8 +562,8 @@ static void handle_commit(struct commit *commit, struct rev_info *rev) get_object_mark(&commit->parents->item->object) != 0 && !full_tree) { parse_commit_or_die(commit->parents->item); - diff_tree_sha1(commit->parents->item->tree->object.oid.hash, - commit->tree->object.oid.hash, "", &rev->diffopt); + diff_tree_oid(&commit->parents->item->tree->object.oid, + &commit->tree->object.oid, "", &rev->diffopt); } else diff_root_tree_oid(&commit->tree->object.oid, diff --git a/builtin/log.c b/builtin/log.c index 6bdba34446..4ef522ee50 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -1043,9 +1043,9 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout, diff_setup_done(&opts); - diff_tree_sha1(origin->tree->object.oid.hash, - head->tree->object.oid.hash, - "", &opts); + diff_tree_oid(&origin->tree->object.oid, + &head->tree->object.oid, + "", &opts); diffcore_std(&opts); diff_flush(&opts); diff --git a/builtin/merge.c b/builtin/merge.c index a4a098f40f..afaed6a2c2 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -415,7 +415,7 @@ static void finish(struct commit *head_commit, DIFF_FORMAT_SUMMARY | DIFF_FORMAT_DIFFSTAT; opts.detect_rename = DIFF_DETECT_RENAME; diff_setup_done(&opts); - diff_tree_sha1(head->hash, new_head->hash, "", &opts); + diff_tree_oid(head, new_head, "", &opts); diffcore_std(&opts); diff_flush(&opts); } |