From a0d12c4433e25e87b67df78b45635df8a098fb23 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Fri, 24 Jun 2016 23:09:23 +0000 Subject: 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 Signed-off-by: Junio C Hamano --- diffcore-break.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'diffcore-break.c') diff --git a/diffcore-break.c b/diffcore-break.c index 5473493e10..a3e796089f 100644 --- a/diffcore-break.c +++ b/diffcore-break.c @@ -58,7 +58,7 @@ static int should_break(struct diff_filespec *src, } if (src->sha1_valid && dst->sha1_valid && - !hashcmp(src->sha1, dst->sha1)) + !oidcmp(&src->oid, &dst->oid)) return 0; /* they are the same */ if (diff_populate_filespec(src, 0) || diff_populate_filespec(dst, 0)) -- cgit v1.2.3