diff: convert struct diff_filespec to struct object_id
Convert struct diff_filespec's sha1 member to use a struct object_id called "oid" instead. The following Coccinelle semantic patch was used to implement this, followed by the transformations in object_id.cocci: @@ struct diff_filespec o; @@ - o.sha1 + o.oid.hash @@ struct diff_filespec *p; @@ - p->sha1 + p->oid.hash Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
c368dde924
commit
a0d12c4433
@ -520,7 +520,7 @@ static void fill_line_ends(struct diff_filespec *spec, long *lines,
|
||||
char *data = NULL;
|
||||
|
||||
if (diff_populate_filespec(spec, 0))
|
||||
die("Cannot read blob %s", sha1_to_hex(spec->sha1));
|
||||
die("Cannot read blob %s", oid_to_hex(&spec->oid));
|
||||
|
||||
ALLOC_ARRAY(ends, size);
|
||||
ends[cur++] = 0;
|
||||
|
Reference in New Issue
Block a user