diff options
author | Jeff King <peff@peff.net> | 2019-10-18 06:49:10 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-28 06:05:17 +0100 |
commit | ec65231571d9316144acac9dde49acef279c713c (patch) | |
tree | 6a20f4f22a96c9279fc636613ee48ccd30c7fd93 /RelNotes | |
parent | fsck: stop checking commit->tree value (diff) | |
download | git-ec65231571d9316144acac9dde49acef279c713c.tar.xz git-ec65231571d9316144acac9dde49acef279c713c.zip |
fsck: stop checking commit->parent counts
In 4516338243 (builtin-fsck: reports missing parent commits,
2008-02-25), we added code to check that fsck found the same number of
parents from parsing the commit itself as we see in the commit struct we
got from parse_commit_buffer(). Back then the rationale was that the
normal commit parser might skip some bad parents.
But earlier in this series, we started treating that reliably as a
parsing error, meaning that we'd complain about it before we even hit
the code in fsck.c.
Let's drop this code, which now makes fsck_commit_buffer() completely
independent of any parsed values in the commit struct (that's
conceptually cleaner, and also opens up more refactoring options).
Note that we can also drop the MISSING_PARENT and MISSING_GRAFT fsck
identifiers. This is no loss, as these would not trigger reliably
anyway. We'd hit them only when lookup_commit() failed, which occurs
only if we happen to have seen the object with another type already in
the same process. In most cases, we'd actually run into the problem
during the connectivity walk, not here.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'RelNotes')
0 files changed, 0 insertions, 0 deletions