{"action":"created","issue":{"url":"https://api.github.com/repos/libgit2/libgit2/issues/3058","labels_url":"https://api.github.com/repos/libgit2/libgit2/issues/3058/labels{/name}","comments_url":"https://api.github.com/repos/libgit2/libgit2/issues/3058/comments","events_url":"https://api.github.com/repos/libgit2/libgit2/issues/3058/events","html_url":"https://github.com/libgit2/libgit2/issues/3058","id":69327732,"number":3058,"title":"Support for shallow repositories","user":{"login":"carlosmn","id":335443,"avatar_url":"https://avatars.githubusercontent.com/u/335443?v=3","gravatar_id":"","url":"https://api.github.com/users/carlosmn","html_url":"https://github.com/carlosmn","followers_url":"https://api.github.com/users/carlosmn/followers","following_url":"https://api.github.com/users/carlosmn/following{/other_user}","gists_url":"https://api.github.com/users/carlosmn/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosmn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosmn/subscriptions","organizations_url":"https://api.github.com/users/carlosmn/orgs","repos_url":"https://api.github.com/users/carlosmn/repos","events_url":"https://api.github.com/users/carlosmn/events{/privacy}","received_events_url":"https://api.github.com/users/carlosmn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/libgit2/libgit2/labels/feature","name":"feature","color":"7ab861"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-18T17:06:36Z","updated_at":"2015-04-28T06:50:11Z","closed_at":null,"body":"git can write a file `.git/shallow` to indicate that the history is cut off at particular commits. We currently do not read this at all and thus libgit2 will regularly fail to work on these repositories with error messages about failing to find objects.\r\n\r\nThe typicall way such a repository is created is by the use of `git clone --depth N`. We do not support this option to clone either, as we do not support the depth negotiation in the protocol.\r\n\r\nIn order to provide support we would have to make sure to check against the list in `.git/shallow` whether we're at the end of the history we should expect to be at, and then not try to walk further back or ignore errors when looking up parents.\r\n\r\nThere are a couple of issues which ask questions about this, I will close them and redirect them here to have a cleaner position from which to start."},"comment":{"url":"https://api.github.com/repos/libgit2/libgit2/issues/comments/96948544","html_url":"https://github.com/libgit2/libgit2/issues/3058#issuecomment-96948544","issue_url":"https://api.github.com/repos/libgit2/libgit2/issues/3058","id":96948544,"user":{"login":"briansoule","id":1596183,"avatar_url":"https://avatars.githubusercontent.com/u/1596183?v=3","gravatar_id":"","url":"https://api.github.com/users/briansoule","html_url":"https://github.com/briansoule","followers_url":"https://api.github.com/users/briansoule/followers","following_url":"https://api.github.com/users/briansoule/following{/other_user}","gists_url":"https://api.github.com/users/briansoule/gists{/gist_id}","starred_url":"https://api.github.com/users/briansoule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briansoule/subscriptions","organizations_url":"https://api.github.com/users/briansoule/orgs","repos_url":"https://api.github.com/users/briansoule/repos","events_url":"https://api.github.com/users/briansoule/events{/privacy}","received_events_url":"https://api.github.com/users/briansoule/received_events","type":"User","site_admin":false},"created_at":"2015-04-28T06:50:11Z","updated_at":"2015-04-28T06:50:11Z","body":"+1 FWIW"}}