Boost logo

Boost :

Subject: Re: [boost] Cannot add any file to GIT "libgit2 returned: Invalid data in index - invalid entry"
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2015-02-25 09:09:31

> -----Original Message-----
> From: Boost [mailto:boost-bounces_at_[hidden]] On Behalf Of Niall Douglas
> Sent: 25 February 2015 13:51
> To: boost_at_[hidden]
> Subject: Re: [boost] Cannot add any file to GIT "libgit2 returned: Invalid data in index - invalid
> On 25 Feb 2015 at 13:04, Paul A. Bristow wrote:
> > Cannot add any new file to GIT repo :-(
> >
> > "libgit2 returned: Invalid data in index - invalid entry"
> Yeah you've corrupted your index.

Gasp - that's not supposed to happen is it?

What have I done wrong?

I'm only using Windows 8.1 64-bit and I have one copy of git (driven by a mixture of Tortoise GIT
and command line).

How can I tell if a git is good and what is corrupt? My last commit didn't give any hints that all
wasn't well.

Should I be doing any regular checking?

> Sometimes you can manually hand edit it back into life, but often it's easier just to zap it and
recreate it.
> Obviously doing that will reset your repo, including working directory, back to last good commit.
> A safe alternative is to relocate the corrupted git checkout elsewhere, clone a new copy in its
place, and
> manually copy over the changes. No chance of losing anything important that way.

I have a backup and a zip of the files, but thousands of changes (to documentation).

> If the same corruption happens a second time, and if you are on Windows, I'd suggest wiping and
> reinstalling your all your gits. A few months ago I had a persistent git index corruption problem
> Windows. git worked fine from mingw, but corrupted outside of mingw.
> I did a total purge of all git, msysgit, tortoisegit and mingw from the system, and reinstalling
> fresh. It fixed the problem, though it cost me a day of work. I think on Windows we get so many
copies of
> git that sometimes the versions get mismatched, and this corruption appears.

I'm not sure what you mean by 'copies of git' - do you so mean so many git repos, or ?

But thanks for the bad news anyway ;-)


Boost list run by bdawes at, gregod at, cpdaniel at, john at