Re: My git repo is broken, how to fix it ?
- From
Johannes Sixt <j.sixt@eudaptics.com>
- Date
- Mar 22, 2007, 17:12 UTC
- Message-ID
- <4602B917.5C2912F4@eudaptics.com>
- In-Reply-To
- <Pine.LNX.4.64.0703220924590.6730@woody.linux-foundation.org>
Linus Torvalds wrote:
Show 13 quoted lines
> 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