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>
This commit is contained in:
committed by
Junio C Hamano
parent
171dccd511
commit
a8c40471ab
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user