summaryrefslogtreecommitdiff
path: root/walker.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 /walker.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 'walker.c')
-rw-r--r--walker.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/walker.c b/walker.c
index 7d1ee30..4eb4df8 100644
--- a/walker.c
+++ b/walker.c
@@ -19,7 +19,7 @@ static void report_missing(const struct object *obj)
{
fprintf(stderr, "Cannot obtain needed %s %s\n",
obj->type ? typename(obj->type): "object",
- sha1_to_hex(obj->sha1));
+ oid_to_hex(&obj->oid));
if (!is_null_sha1(current_commit_sha1))
fprintf(stderr, "while processing commit %s.\n",
sha1_to_hex(current_commit_sha1));
@@ -80,7 +80,7 @@ static int process_commit(struct walker *walker, struct commit *commit)
hashcpy(current_commit_sha1, get_object_hash(commit->object));
- walker_say(walker, "walk %s\n", sha1_to_hex(commit->object.sha1));
+ walker_say(walker, "walk %s\n", oid_to_hex(&commit->object.oid));
if (walker->get_tree) {
if (process(walker, &commit->tree->object))
@@ -130,7 +130,7 @@ static int process_object(struct walker *walker, struct object *obj)
}
return error("Unable to determine requirements "
"of type %s for %s",
- typename(obj->type), sha1_to_hex(obj->sha1));
+ typename(obj->type), oid_to_hex(&obj->oid));
}
static int process(struct walker *walker, struct object *obj)
@@ -139,7 +139,7 @@ static int process(struct walker *walker, struct object *obj)
return 0;
obj->flags |= SEEN;
- if (has_sha1_file(obj->sha1)) {
+ if (has_object_file(&obj->oid)) {
/* We already have it, so we should scan it now. */
obj->flags |= TO_SCAN;
}