From: jidanni@jidanni.org Date: Thu, 01 Jan 2009 04:24:59 GMT Subject: [PATCH] Documentation/git-bundle.txt: Dumping contents of any bundle Message-ID: <87prj7mz50.fsf_-_@jidanni.org> In-Reply-To: <20081219205100.GA26671@coredump.intra.peff.net> >>>>> "JK" == Jeff King writes: JK> AFAIK, there is no tool to try salvaging strings from an incomplete pack JK> (and you can't just run "strings" because the deltas are zlib JK> compressed). So if I were in the police forensics department, I think I JK> would read Documentation/technical/pack-format.txt and start hacking a JK> solution as quickly as possible. Hogwash. Patch follows. Maybe even better methods are available. Signed-off-by: jidanni --- Documentation/git-bundle.txt | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt index 1b66ab7..80248f5 100644 --- a/Documentation/git-bundle.txt +++ b/Documentation/git-bundle.txt @@ -164,6 +164,28 @@ $ git pull bundle would treat it as if it is talking with a remote side over the network. +DUMPING CONTENTS OF ANY BUNDLE +----------------------- + +Even if we cannot unbundle a bundle, + +------------ +$ git init +$ git bundle unbundle mybundle.bun +error: Repository lacks these prerequisite commits... +------------ + +We can still examine all the data contained within, + +------------ +$ sed '/^PACK/,$!d' mybundle.bun > mybundle.pack +$ git unpack-objects < mybundle.pack +$ cd .git/objects +$ ls ??/*|tr -d /|git cat-file --batch-check +$ ls ??/*|tr -d /|git cat-file --batch +------------ + + Author ------ Written by Mark Levedahl -- 1.6.0.6