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>
@ -49,8 +49,8 @@ static int stdin_diff_trees(struct tree *tree1, char *line, int len)
@@ -49,8 +49,8 @@ static int stdin_diff_trees(struct tree *tree1, char *line, int len)
@ -16,7 +16,7 @@ static int show_merge_base(struct commit **rev, int rev_nr, int show_all)
@@ -16,7 +16,7 @@ static int show_merge_base(struct commit **rev, int rev_nr, int show_all)
@ -242,7 +242,7 @@ static int show_bisect_vars(struct rev_list_info *info, int reaches, int all)
@@ -242,7 +242,7 @@ static int show_bisect_vars(struct rev_list_info *info, int reaches, int all)
@ -171,7 +171,7 @@ int verify_bundle(struct bundle_header *header, int verbose)
@@ -171,7 +171,7 @@ int verify_bundle(struct bundle_header *header, int verbose)
@ -327,10 +327,10 @@ int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long s
@@ -327,10 +327,10 @@ int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long s
@ -342,7 +342,7 @@ int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long s
@@ -342,7 +342,7 @@ int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long s
if (tail <= bufptr + parent_entry_len + 1 ||
get_sha1_hex(bufptr + 7, parent.hash) ||
bufptr[parent_entry_len] != '\n')
return error("bad parents in commit %s", sha1_to_hex(item->object.sha1));
return error("bad parents in commit %s", oid_to_hex(&item->object.oid));
bufptr += parent_entry_len + 1;
/*
* The clone is shallow if nr_parent < 0, and we must
@ -384,11 +384,11 @@ int parse_commit_gently(struct commit *item, int quiet_on_missing)
@@ -384,11 +384,11 @@ int parse_commit_gently(struct commit *item, int quiet_on_missing)
@ -2031,8 +2031,8 @@ int stat_tracking_info(struct branch *branch, int *num_ours, int *num_theirs,
@@ -2031,8 +2031,8 @@ int stat_tracking_info(struct branch *branch, int *num_ours, int *num_theirs,
@ -216,11 +216,11 @@ int parse_tree_gently(struct tree *item, int quiet_on_missing)
@@ -216,11 +216,11 @@ int parse_tree_gently(struct tree *item, int quiet_on_missing)
if (!buffer)
return quiet_on_missing ? -1 :
error("Could not read %s",
sha1_to_hex(item->object.sha1));
oid_to_hex(&item->object.oid));
if (type != OBJ_TREE) {
free(buffer);
return error("Object %s not a tree",
sha1_to_hex(item->object.sha1));
oid_to_hex(&item->object.oid));
}
return parse_tree_buffer(item, buffer, size);
}
@ -248,6 +248,6 @@ struct tree *parse_tree_indirect(const unsigned char *sha1)
@@ -248,6 +248,6 @@ struct tree *parse_tree_indirect(const unsigned char *sha1)