{"action":"created","issue":{"url":"https://api.github.com/repos/ParticularLabs/GitVersion/issues/398","labels_url":"https://api.github.com/repos/ParticularLabs/GitVersion/issues/398/labels{/name}","comments_url":"https://api.github.com/repos/ParticularLabs/GitVersion/issues/398/comments","events_url":"https://api.github.com/repos/ParticularLabs/GitVersion/issues/398/events","html_url":"https://github.com/ParticularLabs/GitVersion/issues/398","id":62898089,"number":398,"title":"With large repositories it is slow to delete and reclone the dynamic directory every time","user":{"login":"eggapauli","id":237707,"avatar_url":"https://avatars.githubusercontent.com/u/237707?v=3","gravatar_id":"","url":"https://api.github.com/users/eggapauli","html_url":"https://github.com/eggapauli","followers_url":"https://api.github.com/users/eggapauli/followers","following_url":"https://api.github.com/users/eggapauli/following{/other_user}","gists_url":"https://api.github.com/users/eggapauli/gists{/gist_id}","starred_url":"https://api.github.com/users/eggapauli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eggapauli/subscriptions","organizations_url":"https://api.github.com/users/eggapauli/orgs","repos_url":"https://api.github.com/users/eggapauli/repos","events_url":"https://api.github.com/users/eggapauli/events{/privacy}","received_events_url":"https://api.github.com/users/eggapauli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-19T07:01:49Z","updated_at":"2015-03-19T09:56:49Z","closed_at":null,"body":"We have a repo with about 200MB in it. \r\n\r\nWhen running on our build server ( teamcity ) GitVersion tries to create a dynamic repository by freshly cloning the whole repo on every build. This is very inefficient as it tries to pull the whole repo from github every time. GitVersion should have an option to specify a directory where a local clone can be maintained and then if the directory exists only a fetch will be needed to freshen the contents."},"comment":{"url":"https://api.github.com/repos/ParticularLabs/GitVersion/issues/comments/83460863","html_url":"https://github.com/ParticularLabs/GitVersion/issues/398#issuecomment-83460863","issue_url":"https://api.github.com/repos/ParticularLabs/GitVersion/issues/398","id":83460863,"user":{"login":"eggapauli","id":237707,"avatar_url":"https://avatars.githubusercontent.com/u/237707?v=3","gravatar_id":"","url":"https://api.github.com/users/eggapauli","html_url":"https://github.com/eggapauli","followers_url":"https://api.github.com/users/eggapauli/followers","following_url":"https://api.github.com/users/eggapauli/following{/other_user}","gists_url":"https://api.github.com/users/eggapauli/gists{/gist_id}","starred_url":"https://api.github.com/users/eggapauli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eggapauli/subscriptions","organizations_url":"https://api.github.com/users/eggapauli/orgs","repos_url":"https://api.github.com/users/eggapauli/repos","events_url":"https://api.github.com/users/eggapauli/events{/privacy}","received_events_url":"https://api.github.com/users/eggapauli/received_events","type":"User","site_admin":false},"created_at":"2015-03-19T09:56:48Z","updated_at":"2015-03-19T09:56:48Z","body":"Our current work-around is the following:\r\n\r\nBefore running GitVersion as part of our build, we update a local mirror repository with the latest changes (so we either clone or fetch from the remote repository). Then we run GitVersion on this repository (just with the /b switch) so it can't complain about missing master branches or anything else and tells TeamCity the correct version.  \r\nBut GitVersion is smart and detects that we run under TeamCity (because TEAMCITY_VERSION is set), so before running GitVersion we remove this variable and reset it after GitVersion finished running.\r\nObviously that's a dirty, dirty hack we are not really happy with.\r\n\r\nWe really would be glad if GitVersion allowed the _dynamicrepository to be\r\n  * at a specified location\r\n  * not deleted, but just updated"}}