Subject: Re: My git repo is broken, how to fix it ?

From: Johannes Sixt <[email-masked]>
Date: Thu, 22 Mar 2007 18:12:55 +0100

Linus Torvalds wrote:
> Yeehaa! I think I'm on the right trail.
> 
> Git people: do this:
> 
>         yum install ElectricFence
> 
> (or similar, apt-get, whatever), and then apply this patch, and do
> 
>         make test
> 
> and it will fail in "git-apply"! Which (having read Alexander's corruption
> sequence once more) must have been what corrupted things for Alexander
> too!

Here is a repo, created with the MinGW port. It has a corrupted object,
that you can see even on Linux with just

$ git show :one

It was created with an obviously bogus "git apply" on Windows.
To restore the correct object, just do this on Linux:

$ git read-tree --reset -u HEAD
$ git apply --index patch.file

Now "git show :one" gives you the correct one.

HTH,
-- Hannes