summaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2016-06-24 23:09:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-06-28 18:39:02 (GMT)
commita0d12c4433e25e87b67df78b45635df8a098fb23 (patch)
tree4fccd5651863d2ae9aeeaeabdab57a1c7159609b /wt-status.c
parentc368dde9245fa3d50b7e01e1ff4f9e5c12c718da (diff)
downloadgit-a0d12c4433e25e87b67df78b45635df8a098fb23.zip
git-a0d12c4433e25e87b67df78b45635df8a098fb23.tar.gz
git-a0d12c4433e25e87b67df78b45635df8a098fb23.tar.bz2
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>
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wt-status.c b/wt-status.c
index 4f27bd6..7c2fa8c 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -432,7 +432,8 @@ static void wt_status_collect_changed_cb(struct diff_queue_struct *q,
d->worktree_status = p->status;
d->dirty_submodule = p->two->dirty_submodule;
if (S_ISGITLINK(p->two->mode))
- d->new_submodule_commits = !!hashcmp(p->one->sha1, p->two->sha1);
+ d->new_submodule_commits = !!oidcmp(&p->one->oid,
+ &p->two->oid);
}
}