Skip to content
  • Junio C Hamano's avatar
    revision traversal and pack: notice and die on missing commit · ed62089c
    Junio C Hamano authored
    cc0e6c5a (Handle return code of parse_commit in revision machinery,
    2007-05-04) attempted to tighten error checking in the revision machinery,
    but it wasn't enough.  When get_revision_1() was asked for the next commit
    to return, it tries to read and simplify the parents of the commit to be
    returned, but an error while doing so was silently ignored and reported as
    a truncated history to the caller instead.
    
    This resulted in an early end of "git log" output or a pack that lacks
    older commits from "git pack-objects", without any error indication in the
    exit status from these commands, even though the underlying parse_commit()
    issues an error message to the end user.
    
    Note that the codepath in add_parents_list() that paints parents of an
    UNINTERESTING commit UNINTERESTING silently ignores the error when
    parse_commit() fails; this is deliberate and in line with aeeae1b7
    
    
    (revision traversal: allow UNINTERESTING objects to be missing,
    2009-01-27).
    
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    ed62089c