git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Andy Parkins
Message 12 of 12 in “Edit user manual for grammer.”
  1. Edit user manual for grammer.Steve Hoelzer, Jun 12, 2007
  2. Edit user manual for grammarAndy Parkins, Jun 12, 2007
  3. Johannes SchindelinJun 12, 2007
  4. Andy ParkinsJun 12, 2007
  5. J. Bruce FieldsJun 12, 2007
  6. Andy ParkinsJun 12, 2007
  7. J. Bruce FieldsJun 12, 2007
  8. David KastrupJun 13, 2007
  9. Randal L. SchwartzJun 12, 2007
  10. David KastrupJun 13, 2007
  11. Andy ParkinsJun 13, 2007
  12. Shawn O. PearceJun 14, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.