-r::
When unpacking a corrupt packfile, the command dies at
the first corruption. This flag tells it to keep going
- and make the best effort to salvage as many objects as
+ and make the best effort to recover as many objects as
possible.
#include <sys/time.h>
-static int dry_run, quiet, desperate, has_errors;
-static const char unpack_usage[] = "git-unpack-objects [-n] [-q] < pack-file";
+static int dry_run, quiet, recover, has_errors;
+static const char unpack_usage[] = "git-unpack-objects [-n] [-q] [-r] < pack-file";
/* We always read in 4kB chunks. */
static unsigned char buffer[4096];
error("inflate returned %d\n", ret);
free(buf);
buf = NULL;
- if (!desperate)
+ if (!recover)
exit(1);
has_errors = 1;
break;
if (!base) {
error("failed to read delta-pack base object %s",
sha1_to_hex(base_sha1));
- if (!desperate)
+ if (!recover)
exit(1);
has_errors = 1;
return;
default:
error("bad object type %d", type);
has_errors = 1;
- if (desperate)
+ if (recover)
return;
exit(1);
}
continue;
}
if (!strcmp(arg, "-r")) {
- desperate = 1;
+ recover = 1;
continue;
}
usage(unpack_usage);