diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2016-06-24 23:09:24 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-06-28 11:39:02 -0700 |
commit | 41c9560ee5f9fc4bd3c6580272bd292083a9fe18 (patch) | |
tree | 5dd07bbd754dd1ff28abc083ec509cb3ad1ce0d9 /diffcore-rename.c | |
parent | a0d12c4433e25e87b67df78b45635df8a098fb23 (diff) | |
download | git-41c9560ee5f9fc4bd3c6580272bd292083a9fe18.tar.gz |
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 <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diffcore-rename.c')
-rw-r--r-- | diffcore-rename.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/diffcore-rename.c b/diffcore-rename.c index 22b239a43a..58ac0a531b 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", |