diff options
author | Jeff King <peff@peff.net> | 2017-03-09 08:29:04 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-10 11:51:30 -0800 |
commit | d344d1cb8a1d1bea268ec78f5d7315381a0a6c96 (patch) | |
tree | 5a96072bb00c6580ee579141cdac003129d4870c | |
parent | ref-filter: use contains_result enum consistently (diff) | |
download | tgif-d344d1cb8a1d1bea268ec78f5d7315381a0a6c96.tar.xz |
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>
-rw-r--r-- | ref-filter.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ref-filter.c b/ref-filter.c index 631978a4f9..5cb49b7c24 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -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; } |