Merge branch 'bc/cocci'
Conversion from unsigned char sha1[20] to struct object_id continues. * bc/cocci: diff: convert prep_temp_blob() to struct object_id merge-recursive: convert merge_recursive_generic() to object_id merge-recursive: convert leaf functions to use struct object_id merge-recursive: convert struct merge_file_info to object_id merge-recursive: convert struct stage_data to use object_id diff: rename struct diff_filespec's sha1_valid member diff: convert struct diff_filespec to struct object_id coccinelle: apply object_id Coccinelle transformations coccinelle: convert hashcpy() with null_sha1 to hashclr() contrib/coccinelle: add basic Coccinelle transforms hex: add oid_to_hex_r()
This commit is contained in:
@ -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,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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user