Open vvatanabe opened 5 years ago
This problem was reproduced a build below. https://travis-ci.org/src-d/go-git/builds/533637111
Fixed, plz chk it.
If I am not wrong the .tmp files are files to ignore, are you sure that git is reading this files?
Yes. We provide Git hosting service and tried go-git experimentally.
When git gc
did not complete successfully on bare repository, .tmp_xxx.pack
remained. And when using func (r *Repository) BlobObject(h plumbing.Hash) (*object.Blob, error)
to get a packed blob read .tmp_xxx.pack
internally and occured a error by to get a wrong hash.
Related: https://github.com/src-d/go-git/issues/1223. As I mentioned in https://github.com/src-d/go-git/issues/1149#issuecomment-492969265 the logic that GIT uses is actually different. I don't think the .tmp files should be ignored but the objects/info/packs
file should be consulted.
Merged in https://github.com/go-git/go-git/pull/6
@mcuadros Super happy to see go-git continuing! I only found out it'd moved from this PR. The new repository mentions there was some legal issues - are you able to post a little about that somewhere and maybe post to r/golang about where the project has now landed?
EDIT: Thank you!
fixes by #1149
First, I updated the test case to reproduce the problem, and I will add a patch to fix this problem.