author | Junio C Hamano <gitster@pobox.com> | |
Wed, 11 Feb 2009 09:27:43 +0000 (01:27 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 11 Feb 2009 09:29:52 +0000 (01:29 -0800) | ||
commit | ed62089c1c32a9bfca2ec61d331a70443647344c | |
tree | bc1aad9418072be3a01c1002cafb34af41327302 | tree | snapshot |
parent | 34b146c0f444fc9f83bea3215bd0cd546fc57c33 | commit | diff |
revision traversal and pack: notice and die on missing commit
cc0e6c5 (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 aeeae1b
(revision traversal: allow UNINTERESTING objects to be missing,
2009-01-27).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cc0e6c5 (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 aeeae1b
(revision traversal: allow UNINTERESTING objects to be missing,
2009-01-27).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
revision.c | diff | blob | history | |
t/t5307-pack-missing-commit.sh | [new file with mode: 0755] | blob |