From a3ed7552d6c800b476a3bdfec5fa575295ea4bdf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Mon, 7 Nov 2011 09:59:23 +0700 Subject: [PATCH] fsck: return error code when verify_pack() goes wrong MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- builtin/fsck.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builtin/fsck.c b/builtin/fsck.c index df1a88b51a..4ead98dcab 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -29,6 +29,7 @@ static int write_lost_and_found; static int verbose; #define ERROR_OBJECT 01 #define ERROR_REACHABLE 02 +#define ERROR_PACK 04 #ifdef NO_D_INO_IN_DIRENT #define SORT_DIRENT 0 @@ -626,7 +627,8 @@ int cmd_fsck(int argc, const char **argv, const char *prefix) prepare_packed_git(); for (p = packed_git; p; p = p->next) /* verify gives error messages itself */ - verify_pack(p); + if (verify_pack(p)) + errors_found |= ERROR_PACK; for (p = packed_git; p; p = p->next) { uint32_t j, num; -- 2.11.4.GIT