summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2015-11-10 02:22:28 (GMT)
committerJeff King <peff@peff.net>2015-11-20 13:02:05 (GMT)
commitf2fd0760f62e79609fef7bfd7ecebb002e8e4ced (patch)
tree1f915114b015428730e95a89697783560b672008 /submodule.c
parent7999b2cf772956466baa8925491d6fb1b0963292 (diff)
downloadgit-f2fd0760f62e79609fef7bfd7ecebb002e8e4ced.zip
git-f2fd0760f62e79609fef7bfd7ecebb002e8e4ced.tar.gz
git-f2fd0760f62e79609fef7bfd7ecebb002e8e4ced.tar.bz2
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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/submodule.c b/submodule.c
index 7ea9086..73cd412 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: