summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-09-13 12:59:20 -0700
committerJunio C Hamano <junkio@cox.net>2006-09-13 12:59:49 -0700
commit3b67d2917a0e93aa583c4069f5a00655e05dbd84 (patch)
tree293e08671de85b2cef44829f5a21dd9b8fe1f3d1
parentf986f2c830b24a0f56f2bf4b3f30353ca1e372a9 (diff)
downloadgit-3b67d2917a0e93aa583c4069f5a00655e05dbd84.tar.gz
unpack-objects -r: call it "recover".
The code called this operation "desperate" but the option flag is -r and the word "recover" describes what it does better. Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--Documentation/git-unpack-objects.txt2
-rw-r--r--builtin-unpack-objects.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/Documentation/git-unpack-objects.txt b/Documentation/git-unpack-objects.txt
index 415c09ba10..ff6184b0f7 100644
--- a/Documentation/git-unpack-objects.txt
+++ b/Documentation/git-unpack-objects.txt
@@ -37,7 +37,7 @@ OPTIONS
-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.
diff --git a/builtin-unpack-objects.c b/builtin-unpack-objects.c
index 5f9c0d2f9e..4f96bcae32 100644
--- a/builtin-unpack-objects.c
+++ b/builtin-unpack-objects.c
@@ -10,8 +10,8 @@
#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];
@@ -75,7 +75,7 @@ static void *get_data(unsigned long size)
error("inflate returned %d\n", ret);
free(buf);
buf = NULL;
- if (!desperate)
+ if (!recover)
exit(1);
has_errors = 1;
break;
@@ -192,7 +192,7 @@ static void unpack_delta_entry(unsigned long delta_size)
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;
@@ -247,7 +247,7 @@ static void unpack_one(unsigned nr, unsigned total)
default:
error("bad object type %d", type);
has_errors = 1;
- if (desperate)
+ if (recover)
return;
exit(1);
}
@@ -294,7 +294,7 @@ int cmd_unpack_objects(int argc, const char **argv, const char *prefix)
continue;
}
if (!strcmp(arg, "-r")) {
- desperate = 1;
+ recover = 1;
continue;
}
usage(unpack_usage);