From a8c40471ab0851bf9a58f7dc76f121258e0690e2 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Wed, 21 Mar 2007 10:07:46 -0700 Subject: Remove "pathlen" from "struct name_entry" Since we have the "tree_entry_len()" helper function these days, and don't need to do a full strlen(), there's no point in saving the path length - it's just redundant information. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- builtin-pack-objects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin-pack-objects.c') diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c index 73d448b890..9231b6564f 100644 --- a/builtin-pack-objects.c +++ b/builtin-pack-objects.c @@ -854,7 +854,7 @@ static void add_pbase_object(struct tree_desc *tree, unsigned long size; enum object_type type; - if (entry.pathlen != cmplen || + if (tree_entry_len(entry.path, entry.sha1) != cmplen || memcmp(entry.path, name, cmplen) || !has_sha1_file(entry.sha1) || (type = sha1_object_info(entry.sha1, &size)) < 0) -- cgit v1.2.3