git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Andy Parkins <andyparkins@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] Edit user manual for grammar
Date: Thu, 14 Jun 2007 00:59:20 -0400	[thread overview]
Message-ID: <20070614045920.GX6073@spearce.org> (raw)
In-Reply-To: <20070612175421.GA26767@fieldses.org>

"J. Bruce Fields" <bfields@fieldses.org> wrote:
> 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.

      parent reply	other threads:[~2007-06-14  4:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-12 12:18 [PATCH] Edit user manual for grammer Steve Hoelzer
2007-06-12 15:43 ` [PATCH] Edit user manual for grammar Andy Parkins
2007-06-12 16:14   ` Johannes Schindelin
2007-06-12 18:55     ` Andy Parkins
2007-06-12 17:54   ` J. Bruce Fields
2007-06-12 19:27     ` Andy Parkins
2007-06-12 20:05       ` J. Bruce Fields
2007-06-13  7:17       ` David Kastrup
2007-06-12 21:08     ` Randal L. Schwartz
2007-06-13  7:15     ` David Kastrup
2007-06-13  7:39       ` Andy Parkins
2007-06-14  4:59     ` Shawn O. Pearce [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070614045920.GX6073@spearce.org \
    --to=spearce@spearce.org \
    --cc=andyparkins@gmail.com \
    --cc=bfields@fieldses.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).