Strip namelen out of ce_flags into a ce_namelen field
commitb60e188c51242b72061b5f2f0d4df80397f6125a
authorThomas Gummerer <t.gummerer@gmail.com>
Wed, 11 Jul 2012 09:22:37 +0000 (11 11:22 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 11 Jul 2012 16:42:45 +0000 (11 09:42 -0700)
treea98bd286f05bca385fba527f3c7971a86cc78c14
parent01388518c30c20ccbbb9f99e00314ef291ecda37
Strip namelen out of ce_flags into a ce_namelen field

Strip the name length from the ce_flags field and move it
into its own ce_namelen field in struct cache_entry. This
will both give us a tiny bit of a performance enhancement
when working with long pathnames and is a refactoring for
more readability of the code.

It enhances readability, by making it more clear what
is a flag, and where the length is stored and make it clear
which functions use stages in comparisions and which only
use the length.

It also makes CE_NAMEMASK private, so that users don't
mistakenly write the name length in the flags.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/apply.c
builtin/blame.c
builtin/checkout.c
builtin/update-index.c
cache.h
read-cache.c
tree.c
unpack-trees.c