aboutsummaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2016-06-24 23:09:23 +0000
committerJunio C Hamano <gitster@pobox.com>2016-06-28 11:39:02 -0700
commita0d12c4433e25e87b67df78b45635df8a098fb23 (patch)
tree4fccd5651863d2ae9aeeaeabdab57a1c7159609b /submodule.c
parentc368dde9245fa3d50b7e01e1ff4f9e5c12c718da (diff)
downloadgit-a0d12c4433e25e87b67df78b45635df8a098fb23.tar.gz
git-a0d12c4433e25e87b67df78b45635df8a098fb23.tar.xz
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 'submodule.c')
-rw-r--r--submodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/submodule.c b/submodule.c
index 4532b11d6..cdccf65c6 100644
--- a/submodule.c
+++ b/submodule.c
@@ -445,7 +445,7 @@ static void collect_submodules_from_diff(struct diff_queue_struct *q,
struct diff_filepair *p = q->queue[i];
if (!S_ISGITLINK(p->two->mode))
continue;
- if (submodule_needs_pushing(p->two->path, p->two->sha1))
+ if (submodule_needs_pushing(p->two->path, p->two->oid.hash))
string_list_insert(needs_pushing, p->two->path);
}
}
@@ -577,7 +577,7 @@ static void submodule_collect_changed_cb(struct diff_queue_struct *q,
* being moved around. */
struct string_list_item *path;
path = unsorted_string_list_lookup(&changed_submodule_paths, p->two->path);
- if (!path && !is_submodule_commit_present(p->two->path, p->two->sha1))
+ if (!path && !is_submodule_commit_present(p->two->path, p->two->oid.hash))
string_list_append(&changed_submodule_paths, xstrdup(p->two->path));
} else {
/* Submodule is new or was moved here */