• J
    read_sha1_file(): report correct name of packfile with a corrupt object · b6c4cecc
    Junio C Hamano 提交于
    Clarify the error reporting logic by moving the normal codepath (i.e. we
    read the object we wanted to read correctly) up and return early.
    
    The logic to report the name of the packfile with a corrupt object,
    introduced by e8b15e61 (sha1_file: Show the the type and path to corrupt
    objects, 2010-06-10), was totally bogus.  The function that knows which
    bad object came from what packfile is has_packed_and_bad(); make it report
    which packfile the problem was found.
    
    "Corrupt" is already an adjective, e.g. an object is "corrupt"; we do not
    have to say "corrupted object".
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    b6c4cecc
sha1_file.c 64.1 KB