diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2007-03-21 10:07:46 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-03-21 10:21:56 -0700 |
commit | a8c40471ab0851bf9a58f7dc76f121258e0690e2 (patch) | |
tree | 161da4c14a0d4f45cff256ca0df7789a81545e59 /builtin-pack-objects.c | |
parent | 171dccd511bb4642e4491dc5115549b67a859a5b (diff) | |
download | git-a8c40471ab0851bf9a58f7dc76f121258e0690e2.tar.gz git-a8c40471ab0851bf9a58f7dc76f121258e0690e2.tar.xz |
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 <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r-- | builtin-pack-objects.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c index 73d448b89..9231b6564 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) |