Re: [PATCH] Edit user manual for grammar
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Jun 14, 2007, 04:59 UTC
- Message-ID
- <20070614045920.GX6073@spearce.org>
- In-Reply-To
- <20070612175421.GA26767@fieldses.org>
"J. Bruce Fields" <bfields@fieldses.org> wrote:
Show 11 quoted lines
> On Tue, Jun 12, 2007 at 04:43:19PM +0100, Andy Parkins wrote: > > - "recovery" becomes "recovering" from Steve Hoelzer's original version > > of this patch > > - "if you want" is nicer as "if you wish" > > - "you may" should be "you can"; "you may" is "you have permission to" > > rather than "you can"'s "it is possible to" > > What we really need is a complete recovery tutorial to stick in here > someplace. (One day git complains about a corrupt pack file. What do > you do?) What's been stopping me from doing it, besides time, is no > idea how to come up with a good example to work with.
dd if=/dev/urandom of=.git/pack/pack-DEAD.pack bs=1 seek=12 count=512
Now run git-log. Its probably toast. The front of the packfile is usually commits, and the first object is usually the most recent commit. It starts at byte 12. ;-)
We actually do this in the test suite to verify that verify-pack will detect the corruption. Recovering from it is a bit more interesting and difficult.
The more common corruption is to repack away an important object by accident in a shared object directory arrangement. Or just havee your OS' "disk corruptor^H^H^H^H^H^H^Hvirus scanner" delete the thing. E.g. create a few commits, pick one out of git-log and just rm its file in .git/objects/??. How do you get out of that mess? ;-)
-- Shawn.