diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2015-11-10 02:22:28 +0000 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2015-11-20 08:02:05 -0500 |
commit | f2fd0760f62e79609fef7bfd7ecebb002e8e4ced (patch) | |
tree | 1f915114b015428730e95a89697783560b672008 /submodule.c | |
parent | 7999b2cf772956466baa8925491d6fb1b0963292 (diff) | |
download | git-f2fd0760f62e79609fef7bfd7ecebb002e8e4ced.tar.gz git-f2fd0760f62e79609fef7bfd7ecebb002e8e4ced.tar.xz |
Convert struct object to object_id
struct object is one of the major data structures dealing with object
IDs. Convert it to use struct object_id instead of an unsigned char
array. Convert get_object_hash to refer to the new member as well.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'submodule.c')
-rw-r--r-- | submodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/submodule.c b/submodule.c index 7ea908641..73cd4120a 100644 --- a/submodule.c +++ b/submodule.c @@ -249,7 +249,7 @@ static int prepare_submodule_summary(struct rev_info *rev, const char *path, for (list = merge_bases; list; list = list->next) { list->item->object.flags |= UNINTERESTING; add_pending_object(rev, &list->item->object, - sha1_to_hex(list->item->object.sha1)); + oid_to_hex(&list->item->object.oid)); } return prepare_revision_walk(rev); } @@ -875,7 +875,7 @@ static int find_first_merges(struct object_array *result, const char *path, /* get all revisions that merge commit a */ snprintf(merged_revision, sizeof(merged_revision), "^%s", - sha1_to_hex(a->object.sha1)); + oid_to_hex(&a->object.oid)); init_revisions(&revs, NULL); rev_opts.submodule = path; setup_revisions(ARRAY_SIZE(rev_args)-1, rev_args, &revs, &rev_opts); @@ -1006,7 +1006,7 @@ int merge_submodule(unsigned char result[20], const char *path, "by using:\n\n" " git update-index --cacheinfo 160000 %s \"%s\"\n\n" "which will accept this suggestion.\n", - sha1_to_hex(merges.objects[0].item->sha1), path); + oid_to_hex(&merges.objects[0].item->oid), path); break; default: |