{"action":"closed","issue":{"url":"https://api.github.com/repos/atmos/heaven/issues/79","labels_url":"https://api.github.com/repos/atmos/heaven/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/atmos/heaven/issues/79/comments","events_url":"https://api.github.com/repos/atmos/heaven/issues/79/events","html_url":"https://github.com/atmos/heaven/issues/79","id":41977197,"number":79,"title":"Dealing with corrupt git repositories","user":{"login":"dblandin","id":123595,"avatar_url":"https://avatars.githubusercontent.com/u/123595?v=3","gravatar_id":"","url":"https://api.github.com/users/dblandin","html_url":"https://github.com/dblandin","followers_url":"https://api.github.com/users/dblandin/followers","following_url":"https://api.github.com/users/dblandin/following{/other_user}","gists_url":"https://api.github.com/users/dblandin/gists{/gist_id}","starred_url":"https://api.github.com/users/dblandin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dblandin/subscriptions","organizations_url":"https://api.github.com/users/dblandin/orgs","repos_url":"https://api.github.com/users/dblandin/repos","events_url":"https://api.github.com/users/dblandin/events{/privacy}","received_events_url":"https://api.github.com/users/dblandin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2014-09-04T19:44:53Z","updated_at":"2015-02-16T21:22:35Z","closed_at":"2015-02-16T21:22:35Z","body":"Occasionally, I'll get git output like the following during deploys:\r\n\r\n```\r\nFrom https://github.com/dscout/dscout\r\n542f131..9fcc475 master -> origin/master\r\nerror: unable to read sha1 file of Gemfile (df8c83095564185f146e937a36f5a30267d747f7)\r\nerror: unable to read sha1 file of Gemfile.lock (de830d7489153e2e1d9d14708ca19a9e841b1c4d)\r\nerror: unable to read sha1 file of app/middleware/content_type_correction.rb (2fbfe4469a82722ee8f9bf3212c1282541603e92)\r\nerror: unable to read sha1 file of app/middleware/font_access_headers.rb (22d7334324f748d4585c225b7cbc6a2d8b098b23)\r\nerror: unable to read sha1 file of app/models/mission.rb (9b8d0a941bde2142a63dd2368025282638c6bc02)\r\nerror: unable to read sha1 file of app/models/snippet.rb (e11c908c36498141a298434050f15c90b7b4a8d5)\r\nerror: unable to read sha1 file of app/services/assignment_destroyer.rb (bbff88562509f5cb2c2f135bb74d6bb24afac3d9)\r\nerror: unable to read sha1 file of app/services/group_messenger.rb (f603f81c3811f2ed19b3180d015538c328c603eb)\r\nerror: unable to read sha1 file of config/application.rb (f82ae6f44d58fefb1e1fa7a9a4fa31b77f96f54b)\r\nerror: unable to read sha1 file of spec/factories/message_factory.rb (db36db83391e9ed057595c6d772e575309518871)\r\nerror: unable to read sha1 file of spec/requests/v2/messaging_spec.rb (2aea3ea57a1655f6eb294f904563dd05c8f1c315)\r\nerror: unable to read sha1 file of spec/services/assignment_destroyer_spec.rb (36a1c1095dd7f5b6927e6445edec5357ede59d60)\r\nfatal: Could not reset index file to revision '9fcc475a5b510f8ee76bf945b96b99346e685b89'.\r\n % Total % Received % Xferd Average Speed Time Time Time Current\r\nDload Upload Total Spent Left Speed\r\n \r\n0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\r\n100 809 0 695 100 114 1301 213 --:--:-- --:--:-- --:--:-- 1299\r\n100 1573 0 1459 100 114 2730 213 --:--:-- --:--:-- --:--:-- 2727\r\n```\r\n\r\nThe deploy continues on, which usually doesn't make a big difference when using a Capistrano provider. I'm using Capistrano v3. We don't usually alter the Capistrano configuration, and the remote server will fetch the git repository itself.\r\n\r\nBut, the working directory repo obviously doesn't checkout to the right sha. And for other providers, this will be more problematic (such as deploying straight to S3).\r\n\r\nHas anyone run into this problem on their own setups? Any ideas towards fixing this problem?\r\n\r\nI usually end up deleting the working directory which forces heaven to re-clone the repository during the next deploy.\r\n\r\nI suppose another question is: should the deploy continue on if any task during a provider fails, or should the entire deploy fail immediately and ignore any following tasks."}}