Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2015-11-10 05:22:28 +0300
committerJeff King <peff@peff.net>2015-11-20 16:02:05 +0300
commitf2fd0760f62e79609fef7bfd7ecebb002e8e4ced (patch)
tree1f915114b015428730e95a89697783560b672008 /builtin/rev-list.c
parent7999b2cf772956466baa8925491d6fb1b0963292 (diff)
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 'builtin/rev-list.c')
-rw-r--r--builtin/rev-list.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index 1cd5db1ae5..c4166ea7df 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -84,11 +84,11 @@ static void show_commit(struct commit *commit, void *data)
fputs(find_unique_abbrev(get_object_hash(commit->object), revs->abbrev),
stdout);
else
- fputs(sha1_to_hex(commit->object.sha1), stdout);
+ fputs(oid_to_hex(&commit->object.oid), stdout);
if (revs->print_parents) {
struct commit_list *parents = commit->parents;
while (parents) {
- printf(" %s", sha1_to_hex(parents->item->object.sha1));
+ printf(" %s", oid_to_hex(&parents->item->object.oid));
parents = parents->next;
}
}
@@ -97,7 +97,7 @@ static void show_commit(struct commit *commit, void *data)
children = lookup_decoration(&revs->children, &commit->object);
while (children) {
- printf(" %s", sha1_to_hex(children->item->object.sha1));
+ printf(" %s", oid_to_hex(&children->item->object.oid));
children = children->next;
}
}
@@ -182,8 +182,8 @@ static void finish_object(struct object *obj,
void *cb_data)
{
struct rev_list_info *info = cb_data;
- if (obj->type == OBJ_BLOB && !has_sha1_file(obj->sha1))
- die("missing blob object '%s'", sha1_to_hex(obj->sha1));
+ if (obj->type == OBJ_BLOB && !has_object_file(&obj->oid))
+ die("missing blob object '%s'", oid_to_hex(&obj->oid));
if (info->revs->verify_objects && !obj->parsed && obj->type != OBJ_COMMIT)
parse_object(get_object_hash(*obj));
}
@@ -201,7 +201,7 @@ static void show_object(struct object *obj,
static void show_edge(struct commit *commit)
{
- printf("-%s\n", sha1_to_hex(commit->object.sha1));
+ printf("-%s\n", oid_to_hex(&commit->object.oid));
}
static void print_var_str(const char *var, const char *val)
@@ -242,7 +242,7 @@ static int show_bisect_vars(struct rev_list_info *info, int reaches, int all)
cnt = reaches;
if (revs->commits)
- sha1_to_hex_r(hex, revs->commits->item->object.sha1);
+ sha1_to_hex_r(hex, revs->commits->item->object.oid.hash);
if (flags & BISECT_SHOW_ALL) {
traverse_commit_list(revs, show_commit, show_object, info);