OSDN Git Service

builtin/fetch: factor submodule recurse parsing out to submodule config
[git-core/git.git] / blame.c
diff --git a/blame.c b/blame.c
index 00404b9..194b58e 100644 (file)
--- a/blame.c
+++ b/blame.c
@@ -99,7 +99,7 @@ static struct commit_list **append_parent(struct commit_list **tail, const struc
 {
        struct commit *parent;
 
-       parent = lookup_commit_reference(oid->hash);
+       parent = lookup_commit_reference(oid);
        if (!parent)
                die("no such commit %s", oid_to_hex(oid));
        return &commit_list_insert(parent, tail)->next;
@@ -554,11 +554,11 @@ static struct blame_origin *find_origin(struct commit *parent,
        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,
-                              "", &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) {
@@ -623,11 +623,11 @@ static struct blame_origin *find_rename(struct commit *parent,
        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,
-                              "", &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++) {
@@ -1247,7 +1247,7 @@ static void find_copy_in_parent(struct blame_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.
         */
@@ -1257,11 +1257,11 @@ static void find_copy_in_parent(struct blame_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_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);
@@ -1678,7 +1678,7 @@ static struct commit *dwim_reverse_initial(struct rev_info *revs,
         */
        struct object *obj;
        struct commit *head_commit;
-       unsigned char head_sha1[20];
+       struct object_id head_oid;
 
        if (revs->pending.nr != 1)
                return NULL;
@@ -1690,9 +1690,9 @@ static struct commit *dwim_reverse_initial(struct rev_info *revs,
                return NULL;
 
        /* Do we have HEAD? */
-       if (!resolve_ref_unsafe("HEAD", RESOLVE_REF_READING, head_sha1, NULL))
+       if (!resolve_ref_unsafe("HEAD", RESOLVE_REF_READING, head_oid.hash, NULL))
                return NULL;
-       head_commit = lookup_commit_reference_gently(head_sha1, 1);
+       head_commit = lookup_commit_reference_gently(&head_oid, 1);
        if (!head_commit)
                return NULL;