• N
    restore legacy behavior for read_sha1_file() · ac939109
    Nicolas Pitre 提交于
    Since commit 8eca0b47, it is possible
    for read_sha1_file() to return NULL even with existing objects when they
    are corrupted.  Previously a corrupted object would have terminated the
    program immediately, effectively making read_sha1_file() return NULL
    only when specified object is not found.
    
    Let's restore this behavior for all users of read_sha1_file() and
    provide a separate function with the ability to not terminate when
    bad objects are encountered.
    Signed-off-by: NNicolas Pitre <nico@cam.org>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    ac939109
cache.h 29.1 KB