{"action":"created","issue":{"url":"https://api.github.com/repos/puppetlabs/r10k/issues/518","labels_url":"https://api.github.com/repos/puppetlabs/r10k/issues/518/labels{/name}","comments_url":"https://api.github.com/repos/puppetlabs/r10k/issues/518/comments","events_url":"https://api.github.com/repos/puppetlabs/r10k/issues/518/events","html_url":"https://github.com/puppetlabs/r10k/pull/518","id":112216326,"number":518,"title":"(RK-174) Always sync alternates file when touching thin repos","user":{"login":"adrienthebo","id":172194,"avatar_url":"https://avatars.githubusercontent.com/u/172194?v=3","gravatar_id":"","url":"https://api.github.com/users/adrienthebo","html_url":"https://github.com/adrienthebo","followers_url":"https://api.github.com/users/adrienthebo/followers","following_url":"https://api.github.com/users/adrienthebo/following{/other_user}","gists_url":"https://api.github.com/users/adrienthebo/gists{/gist_id}","starred_url":"https://api.github.com/users/adrienthebo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrienthebo/subscriptions","organizations_url":"https://api.github.com/users/adrienthebo/orgs","repos_url":"https://api.github.com/users/adrienthebo/repos","events_url":"https://api.github.com/users/adrienthebo/events{/privacy}","received_events_url":"https://api.github.com/users/adrienthebo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-19T19:36:00Z","updated_at":"2015-10-19T19:41:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/puppetlabs/r10k/pulls/518","html_url":"https://github.com/puppetlabs/r10k/pull/518","diff_url":"https://github.com/puppetlabs/r10k/pull/518.diff","patch_url":"https://github.com/puppetlabs/r10k/pull/518.patch"},"body":"When r10k switches the Git cachedir, it will try to associate existing thin repositories with a new cached repo, but doesn't properly update the alternates file, which means that it will ignore the new cache directory. This can lead to situations where the repos in the new cache directory are updated but existing thin repositories are referencing Git repositories that were not updated, and are missing objects that only exist in the new cached repo.\r\n\r\nThis commit changes thin repository creation to check and update the alternates file when needed so that cachedir updates are automatically reflected in referenced object dbs."},"comment":{"url":"https://api.github.com/repos/puppetlabs/r10k/issues/comments/149323459","html_url":"https://github.com/puppetlabs/r10k/pull/518#issuecomment-149323459","issue_url":"https://api.github.com/repos/puppetlabs/r10k/issues/518","id":149323459,"user":{"login":"adrienthebo","id":172194,"avatar_url":"https://avatars.githubusercontent.com/u/172194?v=3","gravatar_id":"","url":"https://api.github.com/users/adrienthebo","html_url":"https://github.com/adrienthebo","followers_url":"https://api.github.com/users/adrienthebo/followers","following_url":"https://api.github.com/users/adrienthebo/following{/other_user}","gists_url":"https://api.github.com/users/adrienthebo/gists{/gist_id}","starred_url":"https://api.github.com/users/adrienthebo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrienthebo/subscriptions","organizations_url":"https://api.github.com/users/adrienthebo/orgs","repos_url":"https://api.github.com/users/adrienthebo/repos","events_url":"https://api.github.com/users/adrienthebo/events{/privacy}","received_events_url":"https://api.github.com/users/adrienthebo/received_events","type":"User","site_admin":false},"created_at":"2015-10-19T19:41:31Z","updated_at":"2015-10-19T19:41:31Z","body":"This should probably include tests for some of the introduced changes, but they would be very much testing the implementation. I might write some integration level tests for this."}}