summaryrefslogtreecommitdiff
path: root/combine-diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'combine-diff.c')
-rw-r--r--combine-diff.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/combine-diff.c b/combine-diff.c
index 0e1d4b0..8e2a577 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -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;
@@ -1005,8 +1005,7 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
struct strbuf buf = STRBUF_INIT;
if (strbuf_readlink(&buf, elem->path, st.st_size) < 0) {
- error("readlink(%s): %s", elem->path,
- strerror(errno));
+ error_errno("readlink(%s)", elem->path);
return;
}
result_size = buf.len;
@@ -1269,16 +1268,16 @@ 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);
- pair->one[i].sha1_valid = !is_null_oid(&p->parent[i].oid);
+ oidcpy(&pair->one[i].oid, &p->parent[i].oid);
+ pair->one[i].oid_valid = !is_null_oid(&p->parent[i].oid);
pair->one[i].has_more_entries = 1;
}
pair->one[num_parent - 1].has_more_entries = 0;
pair->two->path = p->path;
pair->two->mode = p->mode;
- hashcpy(pair->two->sha1, p->oid.hash);
- pair->two->sha1_valid = !is_null_oid(&p->oid);
+ oidcpy(&pair->two->oid, &p->oid);
+ pair->two->oid_valid = !is_null_oid(&p->oid);
return pair;
}
@@ -1526,7 +1525,7 @@ void diff_tree_combined(const unsigned char *sha1,
free(tmp);
}
- free_pathspec(&diffopts.pathspec);
+ clear_pathspec(&diffopts.pathspec);
}
void diff_tree_combined_merge(const struct commit *commit, int dense,