• J
    refactor dir_add_name · 6815e569
    Jeff King 提交于
    This is in preparation for keeping two entry lists in the
    dir object.
    
    This patch adds and uses the ALLOC_GROW() macro, which
    implements the commonly used idiom of growing a dynamic
    array using the alloc_nr function (not just in dir.c, but
    everywhere).
    
    We also move creation of a dir_entry to dir_entry_new.
    Signed-off-by: NJeff King <peff@peff.net>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    6815e569
dir.c 14.3 KB