#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);