diff options
| author | Christian Couder <christian.couder@gmail.com> | 2018-08-16 08:13:12 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-08-16 10:56:44 -0700 |
| commit | 108f530385e969feab343b2b8acadeb7bb670009 (patch) | |
| tree | 311cbc0c573fbb5fc0ef4d6697bb017f3752288f /builtin/pack-objects.c | |
| parent | t5320: tests for delta islands (diff) | |
| download | git-108f530385e969feab343b2b8acadeb7bb670009.tar.gz git-108f530385e969feab343b2b8acadeb7bb670009.zip | |
pack-objects: move tree_depth into 'struct packing_data'
This reduces the size of 'struct object_entry' and therefore
makes packing objects more efficient.
This also renames cmp_tree_depth() into tree_depth_compare(),
as it is more modern to have the name of the compare functions
end with "compare".
Helped-by: Jeff King <peff@peff.net>
Helped-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/pack-objects.c')
| -rw-r--r-- | builtin/pack-objects.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 30ef48dc43..fd3e514b31 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -2716,8 +2716,8 @@ static void show_object(struct object *obj, const char *name, void *data) depth++; ent = packlist_find(&to_pack, obj->oid.hash, NULL); - if (ent && depth > ent->tree_depth) - ent->tree_depth = depth; + if (ent && depth > oe_tree_depth(&to_pack, ent)) + oe_set_tree_depth(&to_pack, ent, depth); } } |
