path: root/Documentation/git-unpack-objects.txt
diff options
authorJunio C Hamano <>2006-09-04 05:55:54 (GMT)
committerJunio C Hamano <>2006-09-04 09:42:00 (GMT)
commitf986f2c830b24a0f56f2bf4b3f30353ca1e372a9 (patch)
treec6bcc444c0bcd81b6a4844034bde1a1bdaff248a /Documentation/git-unpack-objects.txt
parentf2e609473cb4aeb3884b7dd57a3a652df4e5edcf (diff)
unpack-objects desperately salvages objects from a corrupt pack
The command unpack-objects dies upon the first error. This is probably considered a feature -- if a pack is corrupt, instead of trying to extract from it and possibly risking to contaminate a good repository with objects whose validity is dubious, we should seek a good copy of the pack and retry. However, we may not have any good copy anywhere. This implements the last resort effort to extract what are salvageable from such a corrupt pack. This flag might have helped Sergio when recovering from a corrupt pack. In my test, it managed to salvage 247 objects out of a pack that had 251 objects but without it the command stopped after extracting 73 objects. Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-unpack-objects.txt')
1 files changed, 7 insertions, 1 deletions
diff --git a/Documentation/git-unpack-objects.txt b/Documentation/git-unpack-objects.txt
index c20b38b..415c09b 100644
--- a/Documentation/git-unpack-objects.txt
+++ b/Documentation/git-unpack-objects.txt
@@ -8,7 +8,7 @@ git-unpack-objects - Unpack objects from a packed archive
-'git-unpack-objects' [-n] [-q] <pack-file
+'git-unpack-objects' [-n] [-q] [-r] <pack-file
@@ -34,6 +34,12 @@ OPTIONS
The command usually shows percentage progress. This
flag suppresses it.
+ 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
+ possible.