src-d / go-git

Project has been moved to: https://github.com/go-git/go-git
https://github.com/go-git/go-git
Apache License 2.0
4.9k stars 541 forks source link

storage/filesystem: dotgit, could not get blob from packfiles #1149

Open vvatanabe opened 5 years ago

vvatanabe commented 5 years ago

Could not get blob from packfiles, occurs a error packfile not found.

The cause is an unnecessary temporary file parsing error generated by git gc.

We should correctly check the packfile name format and skip over not loading those temporary files,

name format of temporary file: .tmp-12345-pack-{hash}.pack

I have a PR.

filipnavara commented 5 years ago

I have run into multiple instances where something like that happens. It seems that regular GIT sometimes produces and consumes a objects/info/packs file with a list of actively used packfiles. Often I have some more pack files in objects/pack that were not cleaned during previous repacking.