зеркало из https://github.com/microsoft/git.git
ref-filter: die on parse_commit errors
The tag-contains algorithm quietly returns "does not contain" when parse_commit() fails. But a parse failure is an indication that the repository is corrupt. We should die loudly rather than producing a bogus result. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
a0262c51d0
Коммит
d344d1cb8a
|
@ -1523,9 +1523,7 @@ static enum contains_result contains_test(struct commit *candidate,
|
|||
return CONTAINS_YES;
|
||||
}
|
||||
|
||||
if (parse_commit(candidate) < 0)
|
||||
return CONTAINS_NO;
|
||||
|
||||
parse_commit_or_die(candidate);
|
||||
return CONTAINS_UNKNOWN;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче