gospeccy icon indicating copy to clipboard operation
gospeccy copied to clipboard

can't clone - repository corrupt?

Open petemoore opened this issue 7 years ago • 5 comments

$ go get -v github.com/remogatto/gospeccy/src/gospeccy
github.com/remogatto/gospeccy (download)
# cd .; git clone https://github.com/remogatto/gospeccy /Users/pmoore/go/src/github.com/remogatto/gospeccy
Cloning into '/Users/pmoore/go/src/github.com/remogatto/gospeccy'...
error: object cec29ea04ebd325e17a9defbd2ec1c027eaf703b: zeroPaddedFilemode: contains zero-padded file modes
fatal: Error in object
fatal: index-pack failed
package github.com/remogatto/gospeccy/src/gospeccy: exit status 128

petemoore avatar May 16 '17 08:05 petemoore

It worked fine for me just now on Ubuntu 16.04 with go1.8.1 and git 2.7.4. Have you got recent versions of those? Also, it might need some work before it will build/run on Mac/Windows (especially the latter), one of which you seem to be using. I've only run it on linux.

ivorget avatar May 16 '17 15:05 ivorget

I thought I might see if I can help out with a Mac port (even maybe Windows!)

I'm using

pmoore@Petes-iMac:~/go/src/github.com/petemoore $ uname -a
Darwin Petes-iMac.local 15.6.0 Darwin Kernel Version 15.6.0: Fri Feb 17 10:21:18 PST 2017; root:xnu-3248.60.11.4.1~1/RELEASE_X86_64 x86_64
pmoore@Petes-iMac:~/go/src/github.com/petemoore $ git version
git version 2.12.0
pmoore@Petes-iMac:~/go/src/github.com/petemoore $ go version
go version go1.8 darwin/amd64
pmoore@Petes-iMac:~/go/src/github.com/petemoore $ 

I can work around the issue by just cloning with a depth of 1, although that might be tricky for feeding back Pull Requests later. Not to worry, I'll see if I can find out what is going wrong.

petemoore avatar May 18 '17 19:05 petemoore

The zeroPaddedFileMode problem can be seen because you have fsckobjects = true in your ~/.gitconfig

jabley avatar May 18 '17 21:05 jabley

Hope jabley's tip helps. And sure it would be nice to see it work on mac/windows. For starters, some of the sdl interface files currently have '+build' directives restricting to linux/freebsd that will need to be fixed. That's all I know off hand.

ivorget avatar May 18 '17 23:05 ivorget

Indeed, that was the case, thanks @jabley and @ivorget!

@ivorget If you run git fsck in your repository, you should see the same problems. It looks like fsck checking is disabled on fetch by default in most git distros, but I think it is diagnosing a genuine issue. I was able to repair the history, but most of the commit SHAs changed (starting from about the 5th commit) so you may prefer not to that. Anyway, I can work with it by disabling the fsck checking when working with this repo.

petemoore avatar Jun 19 '17 12:06 petemoore