Skip to content

Commit

Permalink
fsck: return error code when verify_pack() goes wrong
Browse files Browse the repository at this point in the history
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Nguyễn Thái Ngọc Duy authored and Junio C Hamano committed Nov 7, 2011
1 parent ee6dfb2 commit a3ed755
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion builtin/fsck.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit a3ed755

Please sign in to comment.