aboutsummaryrefslogtreecommitdiff
path: root/builtin/pack-objects.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2015-11-10 02:22:29 +0000
committerJeff King <peff@peff.net>2015-11-20 08:02:05 -0500
commited1c9977cb1b63e4270ad8bdf967a2d02580aa08 (patch)
treef5b52ccae09103672c62c1c11ff0bddc78199829 /builtin/pack-objects.c
parentf2fd0760f62e79609fef7bfd7ecebb002e8e4ced (diff)
downloadgit-ed1c9977cb1b63e4270ad8bdf967a2d02580aa08.tar.gz
git-ed1c9977cb1b63e4270ad8bdf967a2d02580aa08.tar.xz
Remove get_object_hash.
Convert all instances of get_object_hash to use an appropriate reference to the hash member of the oid member of struct object. This provides no functional change, as it is essentially a macro substitution. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'builtin/pack-objects.c')
-rw-r--r--builtin/pack-objects.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index fa1b5cd71..4dae5b11c 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -2277,7 +2277,7 @@ static void read_object_list_from_stdin(void)
static void show_commit(struct commit *commit, void *data)
{
- add_object_entry(get_object_hash(commit->object), OBJ_COMMIT, NULL, 0);
+ add_object_entry(commit->object.oid.hash, OBJ_COMMIT, NULL, 0);
commit->object.flags |= OBJECT_ADDED;
if (write_bitmap_index)
@@ -2291,7 +2291,7 @@ static void show_object(struct object *obj,
char *name = path_name(path, last);
add_preferred_base_object(name);
- add_object_entry(get_object_hash(*obj), obj->type, name, 0);
+ add_object_entry(obj->oid.hash, obj->type, name, 0);
obj->flags |= OBJECT_ADDED;
/*
@@ -2303,7 +2303,7 @@ static void show_object(struct object *obj,
static void show_edge(struct commit *commit)
{
- add_preferred_base(get_object_hash(commit->object));
+ add_preferred_base(commit->object.oid.hash);
}
struct in_pack_object {
@@ -2319,7 +2319,7 @@ struct in_pack {
static void mark_in_pack_object(struct object *object, struct packed_git *p, struct in_pack *in_pack)
{
- in_pack->array[in_pack->nr].offset = find_pack_entry_one(get_object_hash(*object), p);
+ in_pack->array[in_pack->nr].offset = find_pack_entry_one(object->oid.hash, p);
in_pack->array[in_pack->nr].object = object;
in_pack->nr++;
}
@@ -2376,7 +2376,7 @@ static void add_objects_in_unpacked_packs(struct rev_info *revs)
ofscmp);
for (i = 0; i < in_pack.nr; i++) {
struct object *o = in_pack.array[i].object;
- add_object_entry(get_object_hash(*o), o->type, "", 0);
+ add_object_entry(o->oid.hash, o->type, "", 0);
}
}
free(in_pack.array);
@@ -2484,12 +2484,12 @@ static void record_recent_object(struct object *obj,
const char *last,
void *data)
{
- sha1_array_append(&recent_objects, get_object_hash(*obj));
+ sha1_array_append(&recent_objects, obj->oid.hash);
}
static void record_recent_commit(struct commit *commit, void *data)
{
- sha1_array_append(&recent_objects, get_object_hash(commit->object));
+ sha1_array_append(&recent_objects, commit->object.oid.hash);
}
static void get_object_list(int ac, const char **av)