From c66caf7b5b123ea7f7760a9b675394b751cfaf40 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 19 Oct 2013 11:54:08 -0400 Subject: [PATCH] update --- doc/design/assistant/disaster_recovery.mdwn | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/design/assistant/disaster_recovery.mdwn b/doc/design/assistant/disaster_recovery.mdwn index 67054273e6..ccc6a5e6ee 100644 --- a/doc/design/assistant/disaster_recovery.mdwn +++ b/doc/design/assistant/disaster_recovery.mdwn @@ -99,14 +99,14 @@ and inject them back into .git/objects to recover: packs it can handle (which may include parts of corrupt packs) back to loose objects. And delete all packs. 2. Delete all loose corrupt objects. -3. Make a new (bare) clone from the remote. Use `--reference` pointing - at the broken repository, to avoid re-downloading objects that - are present in it. (git does not seem to provide an easy way to just - fetch specific missing objects from a remote; `git fetch-pack` only - operates on refs... but this clone method should be pretty efficient) -4. Unpack any packs in the clone, so we can operate on loose objects. -5. Copy each missing object from the new clone's .git/objects to the - repository. +3. Make a new (bare) clone from the remote. + (Note: git does not seem to provide a way to fetch specific missing + objects from the remote. Also, cannot use `--reference` against + a repository with missing refs. So this seems unavoidably + network-expensive.) +5. Use git-cat-file in raw mode on the clone to dump each missing object, + and feed it into git-hash-object in the corrupt repo. (This avoids + needing to unpack packs in the clone.) 6. If each bad object was able to be repaired this way, we're done! (If not, can reuse the clone for getting objects from the next remote.)