Skip to content
  • Thomas Gummerer's avatar
    Strip namelen out of ce_flags into a ce_namelen field · b60e188c
    Thomas Gummerer authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    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: default avatarThomas Gummerer <t.gummerer@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    b60e188c