Page 1 of 1

Git repository recovery

Posted: 07 Oct 2012, 19:21
by ressu
It would be useful if photorec knew how to recover git repository files. The file format documentation is here:
http://www.kernel.org/pub/software/scm/ ... format.txt

While restoring the repository from these files is not exactly straightforward, it can be done.

The basic restore can be done with the following in photorec.sig:

Code: Select all

pack 0 "PACK" 0x00000002
idx 0 0xFF "tOc"
The problem is that if I try to make a full restore with only these files, I end up with pretty much as much data as the disk image is long. So since my C is really rusty, I'll post this here so that someone with the time can create a proper detection with file length and all.

Re: Git repository recovery

Posted: 12 Oct 2012, 21:58
by cgrenier