builtin-fsck: reports missing parent commits

parse_commit ignores parent commits with certain errors
(eg. a non commit object is already loaded under the sha1 of
the parent). To make fsck reports such errors, it has to compare
the nummer of parent commits returned by parse commit with the
number of parent commits in the object or in the graft/shallow file.

Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Martin Koegler
2008-02-25 22:46:07 +01:00
committed by Junio C Hamano
parent 7914053ba9
commit 4516338243
3 changed files with 26 additions and 1 deletions

View File

@ -193,7 +193,7 @@ static void prepare_commit_graft(void)
commit_graft_prepared = 1;
}
static struct commit_graft *lookup_commit_graft(const unsigned char *sha1)
struct commit_graft *lookup_commit_graft(const unsigned char *sha1)
{
int pos;
prepare_commit_graft();