fsck: exit with non-zero status upon error from fsck_obj()
Upon finding a corrupt loose object, we forgot to note the error to signal it with the exit status of the entire process. [jc: adjusted t1450 and added another test] Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
d31f3ad23d
commit
2e770fe47e
@ -389,7 +389,8 @@ static void fsck_sha1_list(void)
|
||||
unsigned char *sha1 = entry->sha1;
|
||||
|
||||
sha1_list.entry[i] = NULL;
|
||||
fsck_sha1(sha1);
|
||||
if (fsck_sha1(sha1))
|
||||
errors_found |= ERROR_OBJECT;
|
||||
free(entry);
|
||||
}
|
||||
sha1_list.nr = 0;
|
||||
|
||||
Reference in New Issue
Block a user