From 41c9560ee5f9fc4bd3c6580272bd292083a9fe18 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Fri, 24 Jun 2016 23:09:24 +0000 Subject: diff: rename struct diff_filespec's sha1_valid member Now that this struct's sha1 member is called "oid", update the comment and the sha1_valid member to be called "oid_valid" 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_valid + o.oid_valid @@ struct diff_filespec *p; @@ - p->sha1_valid + p->oid_valid Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- diffcore-rename.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'diffcore-rename.c') diff --git a/diffcore-rename.c b/diffcore-rename.c index 22b239a43..58ac0a531 100644 --- a/diffcore-rename.c +++ b/diffcore-rename.c @@ -60,7 +60,7 @@ static int add_rename_dst(struct diff_filespec *two) memmove(rename_dst + first + 1, rename_dst + first, (rename_dst_nr - first - 1) * sizeof(*rename_dst)); rename_dst[first].two = alloc_filespec(two->path); - fill_filespec(rename_dst[first].two, two->oid.hash, two->sha1_valid, + fill_filespec(rename_dst[first].two, two->oid.hash, two->oid_valid, two->mode); rename_dst[first].pair = NULL; return 0; @@ -261,7 +261,7 @@ struct file_similarity { static unsigned int hash_filespec(struct diff_filespec *filespec) { - if (!filespec->sha1_valid) { + if (!filespec->oid_valid) { if (diff_populate_filespec(filespec, 0)) return 0; hash_sha1_file(filespec->data, filespec->size, "blob", -- cgit v1.2.1