diff: convert struct diff_filespec to struct object_id
[gitweb.git] / combine-diff.c
index 8f2313d5022326dc244fa8eba4a8640299ebeac8..3537209cd40c723e3234b8fa2009aed2d27e227a 100644 (file)
@@ -44,9 +44,9 @@ static struct combine_diff_path *intersect_paths(struct combine_diff_path *curr,
                        memset(p->parent, 0,
                               sizeof(p->parent[0]) * num_parent);
 
-                       hashcpy(p->oid.hash, q->queue[i]->two->sha1);
+                       oidcpy(&p->oid, &q->queue[i]->two->oid);
                        p->mode = q->queue[i]->two->mode;
-                       hashcpy(p->parent[n].oid.hash, q->queue[i]->one->sha1);
+                       oidcpy(&p->parent[n].oid, &q->queue[i]->one->oid);
                        p->parent[n].mode = q->queue[i]->one->mode;
                        p->parent[n].status = q->queue[i]->status;
                        *tail = p;
@@ -77,7 +77,7 @@ static struct combine_diff_path *intersect_paths(struct combine_diff_path *curr,
                        continue;
                }
 
-               hashcpy(p->parent[n].oid.hash, q->queue[i]->one->sha1);
+               oidcpy(&p->parent[n].oid, &q->queue[i]->one->oid);
                p->parent[n].mode = q->queue[i]->one->mode;
                p->parent[n].status = q->queue[i]->status;
 
@@ -1268,7 +1268,7 @@ static struct diff_filepair *combined_pair(struct combine_diff_path *p,
        for (i = 0; i < num_parent; i++) {
                pair->one[i].path = p->path;
                pair->one[i].mode = p->parent[i].mode;
-               hashcpy(pair->one[i].sha1, p->parent[i].oid.hash);
+               oidcpy(&pair->one[i].oid, &p->parent[i].oid);
                pair->one[i].sha1_valid = !is_null_oid(&p->parent[i].oid);
                pair->one[i].has_more_entries = 1;
        }
@@ -1276,7 +1276,7 @@ static struct diff_filepair *combined_pair(struct combine_diff_path *p,
 
        pair->two->path = p->path;
        pair->two->mode = p->mode;
-       hashcpy(pair->two->sha1, p->oid.hash);
+       oidcpy(&pair->two->oid, &p->oid);
        pair->two->sha1_valid = !is_null_oid(&p->oid);
        return pair;
 }