fsck: return error code when verify_pack() goes wrong
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
ee6dfb2d83
commit
a3ed7552d6
|
@ -29,6 +29,7 @@ static int write_lost_and_found;
|
||||||
static int verbose;
|
static int verbose;
|
||||||
#define ERROR_OBJECT 01
|
#define ERROR_OBJECT 01
|
||||||
#define ERROR_REACHABLE 02
|
#define ERROR_REACHABLE 02
|
||||||
|
#define ERROR_PACK 04
|
||||||
|
|
||||||
#ifdef NO_D_INO_IN_DIRENT
|
#ifdef NO_D_INO_IN_DIRENT
|
||||||
#define SORT_DIRENT 0
|
#define SORT_DIRENT 0
|
||||||
|
@ -626,7 +627,8 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
|
||||||
prepare_packed_git();
|
prepare_packed_git();
|
||||||
for (p = packed_git; p; p = p->next)
|
for (p = packed_git; p; p = p->next)
|
||||||
/* verify gives error messages itself */
|
/* verify gives error messages itself */
|
||||||
verify_pack(p);
|
if (verify_pack(p))
|
||||||
|
errors_found |= ERROR_PACK;
|
||||||
|
|
||||||
for (p = packed_git; p; p = p->next) {
|
for (p = packed_git; p; p = p->next) {
|
||||||
uint32_t j, num;
|
uint32_t j, num;
|
||||||
|
|
Loading…
Reference in New Issue