{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/origin/issues/7521","repository_url":"https://api.github.com/repos/openshift/origin","labels_url":"https://api.github.com/repos/openshift/origin/issues/7521/labels{/name}","comments_url":"https://api.github.com/repos/openshift/origin/issues/7521/comments","events_url":"https://api.github.com/repos/openshift/origin/issues/7521/events","html_url":"https://github.com/openshift/origin/pull/7521","id":135415184,"number":7521,"title":"[WIP] Use git shallow clone when not using ref","user":{"login":"mfojtik","id":44136,"avatar_url":"https://avatars.githubusercontent.com/u/44136?v=3","gravatar_id":"","url":"https://api.github.com/users/mfojtik","html_url":"https://github.com/mfojtik","followers_url":"https://api.github.com/users/mfojtik/followers","following_url":"https://api.github.com/users/mfojtik/following{/other_user}","gists_url":"https://api.github.com/users/mfojtik/gists{/gist_id}","starred_url":"https://api.github.com/users/mfojtik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfojtik/subscriptions","organizations_url":"https://api.github.com/users/mfojtik/orgs","repos_url":"https://api.github.com/users/mfojtik/repos","events_url":"https://api.github.com/users/mfojtik/events{/privacy}","received_events_url":"https://api.github.com/users/mfojtik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/openshift/origin/milestones/13","html_url":"https://github.com/openshift/origin/milestones/1.2.x","labels_url":"https://api.github.com/repos/openshift/origin/milestones/13/labels","id":1594965,"number":13,"title":"1.2.x","description":"Features delivered after 1.2.","creator":{"login":"smarterclayton","id":1163175,"avatar_url":"https://avatars.githubusercontent.com/u/1163175?v=3","gravatar_id":"","url":"https://api.github.com/users/smarterclayton","html_url":"https://github.com/smarterclayton","followers_url":"https://api.github.com/users/smarterclayton/followers","following_url":"https://api.github.com/users/smarterclayton/following{/other_user}","gists_url":"https://api.github.com/users/smarterclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/smarterclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarterclayton/subscriptions","organizations_url":"https://api.github.com/users/smarterclayton/orgs","repos_url":"https://api.github.com/users/smarterclayton/repos","events_url":"https://api.github.com/users/smarterclayton/events{/privacy}","received_events_url":"https://api.github.com/users/smarterclayton/received_events","type":"User","site_admin":false},"open_issues":28,"closed_issues":0,"state":"open","created_at":"2016-02-20T19:27:29Z","updated_at":"2016-02-22T13:27:27Z","due_on":"2016-04-22T04:00:00Z","closed_at":null},"comments":6,"created_at":"2016-02-22T13:21:17Z","updated_at":"2016-02-22T14:11:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/7521","html_url":"https://github.com/openshift/origin/pull/7521","diff_url":"https://github.com/openshift/origin/pull/7521.diff","patch_url":"https://github.com/openshift/origin/pull/7521.patch"},"body":"According to `git clone` man page:\r\n\r\n```\r\n--depth\r\nCreate a shallow clone with a history truncated to the specified number of commits.\r\n```\r\n\r\nThis **significantly** improves the times of downloading the source code repository, when there is no \"ref\" specified (basically just get the latest master). In case of origin, it is ~20seconds.\r\n\r\nThe downside of doing shallow clone is inability to checkout/fetch the ref if specified, so when you do specify \"ref\", we need to fallback to \"slow\" full git clone. "},"comment":{"url":"https://api.github.com/repos/openshift/origin/issues/comments/187191392","html_url":"https://github.com/openshift/origin/pull/7521#issuecomment-187191392","issue_url":"https://api.github.com/repos/openshift/origin/issues/7521","id":187191392,"user":{"login":"liggitt","id":980082,"avatar_url":"https://avatars.githubusercontent.com/u/980082?v=3","gravatar_id":"","url":"https://api.github.com/users/liggitt","html_url":"https://github.com/liggitt","followers_url":"https://api.github.com/users/liggitt/followers","following_url":"https://api.github.com/users/liggitt/following{/other_user}","gists_url":"https://api.github.com/users/liggitt/gists{/gist_id}","starred_url":"https://api.github.com/users/liggitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liggitt/subscriptions","organizations_url":"https://api.github.com/users/liggitt/orgs","repos_url":"https://api.github.com/users/liggitt/repos","events_url":"https://api.github.com/users/liggitt/events{/privacy}","received_events_url":"https://api.github.com/users/liggitt/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T14:11:09Z","updated_at":"2016-02-22T14:11:09Z","body":"we need better real-world tests around this stuff. Can we get tests for the following scenarios:\r\n* unqualified clone (expect master files)\r\n* unqualified clone with submodules (expect master files, contents of submodules from recorded refs in master)\r\n* commit clone (expect files at that commit)\r\n* commit clone with submodules (expect files at that commit, contents of submodules from recorded refs at that commit)\r\n* branch clone (expect files at that branch)\r\n* branch clone with submodules (expect files at that branch, contents of submodules from recorded refs at that branch)"}}