X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-fsck.c;h=0929c7f245cbe85a4a68374850871a0ffbcdeec3;hb=e07fd15b1295393ddf954b9fdd0c3a961e5509c5;hp=b3d38fa277b3d0024b9c46a62cf15bc2448cc1e7;hpb=bc29df602267b1e5783a93d6ff10909c597e5fdc;p=git.git diff --git a/builtin-fsck.c b/builtin-fsck.c index b3d38fa27..0929c7f24 100644 --- a/builtin-fsck.c +++ b/builtin-fsck.c @@ -19,7 +19,7 @@ static int show_root; static int show_tags; static int show_unreachable; static int include_reflogs = 1; -static int check_full; +static int check_full = 1; static int check_strict; static int keep_cache_objects; static unsigned char head_sha1[20]; @@ -47,6 +47,7 @@ static void objreport(struct object *obj, const char *severity, fputs("\n", stderr); } +__attribute__((format (printf, 2, 3))) static int objerror(struct object *obj, const char *err, ...) { va_list params; @@ -57,6 +58,7 @@ static int objerror(struct object *obj, const char *err, ...) return -1; } +__attribute__((format (printf, 3, 4))) static int fsck_error_func(struct object *obj, int type, const char *err, ...) { va_list params; @@ -576,7 +578,7 @@ static struct option fsck_opts[] = { OPT_BOOLEAN(0, "root", &show_root, "report root nodes"), OPT_BOOLEAN(0, "cache", &keep_cache_objects, "make index objects head nodes"), OPT_BOOLEAN(0, "reflogs", &include_reflogs, "make reflogs head nodes (default)"), - OPT_BOOLEAN(0, "full", &check_full, "also consider alternate objects"), + OPT_BOOLEAN(0, "full", &check_full, "also consider packs and alternate objects"), OPT_BOOLEAN(0, "strict", &check_strict, "enable more strict checking"), OPT_BOOLEAN(0, "lost-found", &write_lost_and_found, "write dangling objects in .git/lost-found"), @@ -589,6 +591,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix) struct alternate_object_database *alt; errors_found = 0; + read_replace_refs = 0; argc = parse_options(argc, argv, prefix, fsck_opts, fsck_usage, 0); if (write_lost_and_found) {