{"action":"created","comment":{"url":"https://api.github.com/repos/paulmillr/init-skeleton/pulls/comments/47675086","id":47675086,"diff_hunk":"@@ -116,26 +123,57 @@ var cleanURL = function(address) {\n // Returns nothing.\n var clone = function(address, rootPath, callback) {\n   var url = cleanURL(address);\n-  logger.log('Cloning git repo \"' + url + '\" to \"' + rootPath + '\"...');\n-  tmp.dir({unsafeCleanup: true}, function(error, tempPath, cleanupCallback) {\n-    if (error != null) {\n-      return callback(new Error(\"Temp dir error: \" + error.toString()));\n-    }\n-    var cmd = 'git clone ' + url + ' ' + tempPath;\n-    exec(cmd, function(error, stdout, stderr) {\n-      if (error != null) {\n-        return callback(new Error(\"Git clone error: \" + stderr.toString()));\n-      }\n-      rimraf(sysPath.join(tempPath, '.git'), function(error) {\n+  var cacheDir = sysPath.join(os.homedir(), '.init-skeleton', 'cache');\n+  var repoHash = sha1Digest(url);","path":"index.js","position":39,"original_position":39,"commit_id":"1fa2867a57bd2743d3c22332329a5905f2fda2f8","original_commit_id":"1fa2867a57bd2743d3c22332329a5905f2fda2f8","user":{"login":"goshakkk","id":315596,"avatar_url":"https://avatars.githubusercontent.com/u/315596?v=3","gravatar_id":"","url":"https://api.github.com/users/goshakkk","html_url":"https://github.com/goshakkk","followers_url":"https://api.github.com/users/goshakkk/followers","following_url":"https://api.github.com/users/goshakkk/following{/other_user}","gists_url":"https://api.github.com/users/goshakkk/gists{/gist_id}","starred_url":"https://api.github.com/users/goshakkk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goshakkk/subscriptions","organizations_url":"https://api.github.com/users/goshakkk/orgs","repos_url":"https://api.github.com/users/goshakkk/repos","events_url":"https://api.github.com/users/goshakkk/events{/privacy}","received_events_url":"https://api.github.com/users/goshakkk/received_events","type":"User","site_admin":false},"body":"Do we? I mean, we're literally cloning the whole repo and if the cached one exists, we do `git pull`","created_at":"2015-12-15T18:17:45Z","updated_at":"2015-12-15T18:17:45Z","html_url":"https://github.com/paulmillr/init-skeleton/pull/10#discussion_r47675086","pull_request_url":"https://api.github.com/repos/paulmillr/init-skeleton/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/paulmillr/init-skeleton/pulls/comments/47675086"},"html":{"href":"https://github.com/paulmillr/init-skeleton/pull/10#discussion_r47675086"},"pull_request":{"href":"https://api.github.com/repos/paulmillr/init-skeleton/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/paulmillr/init-skeleton/pulls/10","id":53697220,"html_url":"https://github.com/paulmillr/init-skeleton/pull/10","diff_url":"https://github.com/paulmillr/init-skeleton/pull/10.diff","patch_url":"https://github.com/paulmillr/init-skeleton/pull/10.patch","issue_url":"https://api.github.com/repos/paulmillr/init-skeleton/issues/10","number":10,"state":"open","locked":false,"title":"Cache skeletons","user":{"login":"goshakkk","id":315596,"avatar_url":"https://avatars.githubusercontent.com/u/315596?v=3","gravatar_id":"","url":"https://api.github.com/users/goshakkk","html_url":"https://github.com/goshakkk","followers_url":"https://api.github.com/users/goshakkk/followers","following_url":"https://api.github.com/users/goshakkk/following{/other_user}","gists_url":"https://api.github.com/users/goshakkk/gists{/gist_id}","starred_url":"https://api.github.com/users/goshakkk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goshakkk/subscriptions","organizations_url":"https://api.github.com/users/goshakkk/orgs","repos_url":"https://api.github.com/users/goshakkk/repos","events_url":"https://api.github.com/users/goshakkk/events{/privacy}","received_events_url":"https://api.github.com/users/goshakkk/received_events","type":"User","site_admin":false},"body":"brunch/brunch#1054","created_at":"2015-12-15T12:32:31Z","updated_at":"2015-12-15T18:17:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e05b43bcb729279a061dbd70551c9a78902330a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/paulmillr/init-skeleton/pulls/10/commits","review_comments_url":"https://api.github.com/repos/paulmillr/init-skeleton/pulls/10/comments","review_comment_url":"https://api.github.com/repos/paulmillr/init-skeleton/pulls/comments{/number}","comments_url":"https://api.github.com/repos/paulmillr/init-skeleton/issues/10/comments","statuses_url":"https://api.github.com/repos/paulmillr/init-skeleton/statuses/1fa2867a57bd2743d3c22332329a5905f2fda2f8","head":{"label":"hellyeahllc:skeleton-caching","ref":"skeleton-caching","sha":"1fa2867a57bd2743d3c22332329a5905f2fda2f8","user":{"login":"hellyeahllc","id":6674092,"avatar_url":"https://avatars.githubusercontent.com/u/6674092?v=3","gravatar_id":"","url":"https://api.github.com/users/hellyeahllc","html_url":"https://github.com/hellyeahllc","followers_url":"https://api.github.com/users/hellyeahllc/followers","following_url":"https://api.github.com/users/hellyeahllc/following{/other_user}","gists_url":"https://api.github.com/users/hellyeahllc/gists{/gist_id}","starred_url":"https://api.github.com/users/hellyeahllc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hellyeahllc/subscriptions","organizations_url":"https://api.github.com/users/hellyeahllc/orgs","repos_url":"https://api.github.com/users/hellyeahllc/repos","events_url":"https://api.github.com/users/hellyeahllc/events{/privacy}","received_events_url":"https://api.github.com/users/hellyeahllc/received_events","type":"Organization","site_admin":false},"repo":{"id":48038502,"name":"init-skeleton","full_name":"hellyeahllc/init-skeleton","owner":{"login":"hellyeahllc","id":6674092,"avatar_url":"https://avatars.githubusercontent.com/u/6674092?v=3","gravatar_id":"","url":"https://api.github.com/users/hellyeahllc","html_url":"https://github.com/hellyeahllc","followers_url":"https://api.github.com/users/hellyeahllc/followers","following_url":"https://api.github.com/users/hellyeahllc/following{/other_user}","gists_url":"https://api.github.com/users/hellyeahllc/gists{/gist_id}","starred_url":"https://api.github.com/users/hellyeahllc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hellyeahllc/subscriptions","organizations_url":"https://api.github.com/users/hellyeahllc/orgs","repos_url":"https://api.github.com/users/hellyeahllc/repos","events_url":"https://api.github.com/users/hellyeahllc/events{/privacy}","received_events_url":"https://api.github.com/users/hellyeahllc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hellyeahllc/init-skeleton","description":"A simple interface that clones or copies skeletons (base projects for your apps).","fork":true,"url":"https://api.github.com/repos/hellyeahllc/init-skeleton","forks_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/forks","keys_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/teams","hooks_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/hooks","issue_events_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/issues/events{/number}","events_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/events","assignees_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/assignees{/user}","branches_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/branches{/branch}","tags_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/tags","blobs_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/git/refs{/sha}","trees_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/statuses/{sha}","languages_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/languages","stargazers_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/stargazers","contributors_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/contributors","subscribers_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/subscribers","subscription_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/subscription","commits_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/commits{/sha}","git_commits_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/git/commits{/sha}","comments_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/comments{/number}","issue_comment_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/issues/comments{/number}","contents_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/contents/{+path}","compare_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/merges","archive_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/downloads","issues_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/issues{/number}","pulls_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/pulls{/number}","milestones_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/milestones{/number}","notifications_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/labels{/name}","releases_url":"https://api.github.com/repos/hellyeahllc/init-skeleton/releases{/id}","created_at":"2015-12-15T11:24:41Z","updated_at":"2015-12-15T11:24:41Z","pushed_at":"2015-12-15T12:32:06Z","git_url":"git://github.com/hellyeahllc/init-skeleton.git","ssh_url":"git@github.com:hellyeahllc/init-skeleton.git","clone_url":"https://github.com/hellyeahllc/init-skeleton.git","svn_url":"https://github.com/hellyeahllc/init-skeleton","homepage":"","size":43,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"paulmillr:master","ref":"master","sha":"394b7eeed2418b56ca7da35ab867e73ebd2e5f85","user":{"login":"paulmillr","id":574696,"avatar_url":"https://avatars.githubusercontent.com/u/574696?v=3","gravatar_id":"","url":"https://api.github.com/users/paulmillr","html_url":"https://github.com/paulmillr","followers_url":"https://api.github.com/users/paulmillr/followers","following_url":"https://api.github.com/users/paulmillr/following{/other_user}","gists_url":"https://api.github.com/users/paulmillr/gists{/gist_id}","starred_url":"https://api.github.com/users/paulmillr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulmillr/subscriptions","organizations_url":"https://api.github.com/users/paulmillr/orgs","repos_url":"https://api.github.com/users/paulmillr/repos","events_url":"https://api.github.com/users/paulmillr/events{/privacy}","received_events_url":"https://api.github.com/users/paulmillr/received_events","type":"User","site_admin":false},"repo":{"id":8455774,"name":"init-skeleton","full_name":"paulmillr/init-skeleton","owner":{"login":"paulmillr","id":574696,"avatar_url":"https://avatars.githubusercontent.com/u/574696?v=3","gravatar_id":"","url":"https://api.github.com/users/paulmillr","html_url":"https://github.com/paulmillr","followers_url":"https://api.github.com/users/paulmillr/followers","following_url":"https://api.github.com/users/paulmillr/following{/other_user}","gists_url":"https://api.github.com/users/paulmillr/gists{/gist_id}","starred_url":"https://api.github.com/users/paulmillr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulmillr/subscriptions","organizations_url":"https://api.github.com/users/paulmillr/orgs","repos_url":"https://api.github.com/users/paulmillr/repos","events_url":"https://api.github.com/users/paulmillr/events{/privacy}","received_events_url":"https://api.github.com/users/paulmillr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paulmillr/init-skeleton","description":"A simple interface that clones or copies skeletons (base projects for your apps).","fork":false,"url":"https://api.github.com/repos/paulmillr/init-skeleton","forks_url":"https://api.github.com/repos/paulmillr/init-skeleton/forks","keys_url":"https://api.github.com/repos/paulmillr/init-skeleton/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paulmillr/init-skeleton/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paulmillr/init-skeleton/teams","hooks_url":"https://api.github.com/repos/paulmillr/init-skeleton/hooks","issue_events_url":"https://api.github.com/repos/paulmillr/init-skeleton/issues/events{/number}","events_url":"https://api.github.com/repos/paulmillr/init-skeleton/events","assignees_url":"https://api.github.com/repos/paulmillr/init-skeleton/assignees{/user}","branches_url":"https://api.github.com/repos/paulmillr/init-skeleton/branches{/branch}","tags_url":"https://api.github.com/repos/paulmillr/init-skeleton/tags","blobs_url":"https://api.github.com/repos/paulmillr/init-skeleton/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paulmillr/init-skeleton/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paulmillr/init-skeleton/git/refs{/sha}","trees_url":"https://api.github.com/repos/paulmillr/init-skeleton/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paulmillr/init-skeleton/statuses/{sha}","languages_url":"https://api.github.com/repos/paulmillr/init-skeleton/languages","stargazers_url":"https://api.github.com/repos/paulmillr/init-skeleton/stargazers","contributors_url":"https://api.github.com/repos/paulmillr/init-skeleton/contributors","subscribers_url":"https://api.github.com/repos/paulmillr/init-skeleton/subscribers","subscription_url":"https://api.github.com/repos/paulmillr/init-skeleton/subscription","commits_url":"https://api.github.com/repos/paulmillr/init-skeleton/commits{/sha}","git_commits_url":"https://api.github.com/repos/paulmillr/init-skeleton/git/commits{/sha}","comments_url":"https://api.github.com/repos/paulmillr/init-skeleton/comments{/number}","issue_comment_url":"https://api.github.com/repos/paulmillr/init-skeleton/issues/comments{/number}","contents_url":"https://api.github.com/repos/paulmillr/init-skeleton/contents/{+path}","compare_url":"https://api.github.com/repos/paulmillr/init-skeleton/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paulmillr/init-skeleton/merges","archive_url":"https://api.github.com/repos/paulmillr/init-skeleton/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paulmillr/init-skeleton/downloads","issues_url":"https://api.github.com/repos/paulmillr/init-skeleton/issues{/number}","pulls_url":"https://api.github.com/repos/paulmillr/init-skeleton/pulls{/number}","milestones_url":"https://api.github.com/repos/paulmillr/init-skeleton/milestones{/number}","notifications_url":"https://api.github.com/repos/paulmillr/init-skeleton/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paulmillr/init-skeleton/labels{/name}","releases_url":"https://api.github.com/repos/paulmillr/init-skeleton/releases{/id}","created_at":"2013-02-27T12:48:37Z","updated_at":"2015-12-15T11:23:28Z","pushed_at":"2015-12-15T12:32:32Z","git_url":"git://github.com/paulmillr/init-skeleton.git","ssh_url":"git@github.com:paulmillr/init-skeleton.git","clone_url":"https://github.com/paulmillr/init-skeleton.git","svn_url":"https://github.com/paulmillr/init-skeleton","homepage":"","size":41,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":3,"forks":6,"open_issues":3,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/paulmillr/init-skeleton/pulls/10"},"html":{"href":"https://github.com/paulmillr/init-skeleton/pull/10"},"issue":{"href":"https://api.github.com/repos/paulmillr/init-skeleton/issues/10"},"comments":{"href":"https://api.github.com/repos/paulmillr/init-skeleton/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/paulmillr/init-skeleton/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/paulmillr/init-skeleton/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/paulmillr/init-skeleton/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/paulmillr/init-skeleton/statuses/1fa2867a57bd2743d3c22332329a5905f2fda2f8"}}}}