{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular-cli/pulls/comments/63567746","id":63567746,"diff_hunk":"@@ -30,6 +30,23 @@ module.exports = Task.extend({\n \n     return exec('git --version')\n       .then(function () {\n+          \n+        // \"true\" if cmd executes in a work tree\n+        // \"false if cmd executes in a '.git' tree\n+        // \"fatal error\" if cmd executes in fresh directory (only here we should do a 'git init')  \n+        return exec('git rev-parse --is-inside-work-tree')\n+          .then(function () {\n+            ui.writeLine(chalk.red('Directory is already under version control. Skipping initialization of git.'));\n+            throw \"Skipping\";","path":"addon/ng2/tasks/git-init.js","position":11,"original_position":11,"commit_id":"8652d3c946c36ca86d99734abc1d8ad05c138afd","original_commit_id":"8652d3c946c36ca86d99734abc1d8ad05c138afd","user":{"login":"hansl","id":681969,"avatar_url":"https://avatars.githubusercontent.com/u/681969?v=3","gravatar_id":"","url":"https://api.github.com/users/hansl","html_url":"https://github.com/hansl","followers_url":"https://api.github.com/users/hansl/followers","following_url":"https://api.github.com/users/hansl/following{/other_user}","gists_url":"https://api.github.com/users/hansl/gists{/gist_id}","starred_url":"https://api.github.com/users/hansl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hansl/subscriptions","organizations_url":"https://api.github.com/users/hansl/orgs","repos_url":"https://api.github.com/users/hansl/repos","events_url":"https://api.github.com/users/hansl/events{/privacy}","received_events_url":"https://api.github.com/users/hansl/received_events","type":"User","site_admin":false},"body":"This isn't useful, really.","created_at":"2016-05-17T17:34:46Z","updated_at":"2016-05-17T17:34:46Z","html_url":"https://github.com/angular/angular-cli/pull/802#discussion_r63567746","pull_request_url":"https://api.github.com/repos/angular/angular-cli/pulls/802","_links":{"self":{"href":"https://api.github.com/repos/angular/angular-cli/pulls/comments/63567746"},"html":{"href":"https://github.com/angular/angular-cli/pull/802#discussion_r63567746"},"pull_request":{"href":"https://api.github.com/repos/angular/angular-cli/pulls/802"}}},"pull_request":{"url":"https://api.github.com/repos/angular/angular-cli/pulls/802","id":70395428,"html_url":"https://github.com/angular/angular-cli/pull/802","diff_url":"https://github.com/angular/angular-cli/pull/802.diff","patch_url":"https://github.com/angular/angular-cli/pull/802.patch","issue_url":"https://api.github.com/repos/angular/angular-cli/issues/802","number":802,"state":"open","locked":false,"title":"fix(): skips initialization of git if directory is already under version control","user":{"login":"JohannesHoppe","id":640639,"avatar_url":"https://avatars.githubusercontent.com/u/640639?v=3","gravatar_id":"","url":"https://api.github.com/users/JohannesHoppe","html_url":"https://github.com/JohannesHoppe","followers_url":"https://api.github.com/users/JohannesHoppe/followers","following_url":"https://api.github.com/users/JohannesHoppe/following{/other_user}","gists_url":"https://api.github.com/users/JohannesHoppe/gists{/gist_id}","starred_url":"https://api.github.com/users/JohannesHoppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohannesHoppe/subscriptions","organizations_url":"https://api.github.com/users/JohannesHoppe/orgs","repos_url":"https://api.github.com/users/JohannesHoppe/repos","events_url":"https://api.github.com/users/JohannesHoppe/events{/privacy}","received_events_url":"https://api.github.com/users/JohannesHoppe/received_events","type":"User","site_admin":false},"body":"avoids nested git repos, which are probably not what we wanted to have\r\nsee also: http://boxysystems.com/index.php/nested-git-repo-gotchas/","created_at":"2016-05-17T17:15:01Z","updated_at":"2016-05-17T17:34:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"361536de2fa441cd4d899b28e1bcd8c4aad65be7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/angular/angular-cli/pulls/802/commits","review_comments_url":"https://api.github.com/repos/angular/angular-cli/pulls/802/comments","review_comment_url":"https://api.github.com/repos/angular/angular-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/angular-cli/issues/802/comments","statuses_url":"https://api.github.com/repos/angular/angular-cli/statuses/8652d3c946c36ca86d99734abc1d8ad05c138afd","head":{"label":"JohannesHoppe:git-init-check-if-inside-work-tree","ref":"git-init-check-if-inside-work-tree","sha":"8652d3c946c36ca86d99734abc1d8ad05c138afd","user":{"login":"JohannesHoppe","id":640639,"avatar_url":"https://avatars.githubusercontent.com/u/640639?v=3","gravatar_id":"","url":"https://api.github.com/users/JohannesHoppe","html_url":"https://github.com/JohannesHoppe","followers_url":"https://api.github.com/users/JohannesHoppe/followers","following_url":"https://api.github.com/users/JohannesHoppe/following{/other_user}","gists_url":"https://api.github.com/users/JohannesHoppe/gists{/gist_id}","starred_url":"https://api.github.com/users/JohannesHoppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohannesHoppe/subscriptions","organizations_url":"https://api.github.com/users/JohannesHoppe/orgs","repos_url":"https://api.github.com/users/JohannesHoppe/repos","events_url":"https://api.github.com/users/JohannesHoppe/events{/privacy}","received_events_url":"https://api.github.com/users/JohannesHoppe/received_events","type":"User","site_admin":false},"repo":{"id":58759508,"name":"angular-cli","full_name":"JohannesHoppe/angular-cli","owner":{"login":"JohannesHoppe","id":640639,"avatar_url":"https://avatars.githubusercontent.com/u/640639?v=3","gravatar_id":"","url":"https://api.github.com/users/JohannesHoppe","html_url":"https://github.com/JohannesHoppe","followers_url":"https://api.github.com/users/JohannesHoppe/followers","following_url":"https://api.github.com/users/JohannesHoppe/following{/other_user}","gists_url":"https://api.github.com/users/JohannesHoppe/gists{/gist_id}","starred_url":"https://api.github.com/users/JohannesHoppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohannesHoppe/subscriptions","organizations_url":"https://api.github.com/users/JohannesHoppe/orgs","repos_url":"https://api.github.com/users/JohannesHoppe/repos","events_url":"https://api.github.com/users/JohannesHoppe/events{/privacy}","received_events_url":"https://api.github.com/users/JohannesHoppe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JohannesHoppe/angular-cli","description":"CLI tool for Angular2","fork":true,"url":"https://api.github.com/repos/JohannesHoppe/angular-cli","forks_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/forks","keys_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/teams","hooks_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/hooks","issue_events_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/issues/events{/number}","events_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/events","assignees_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/assignees{/user}","branches_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/branches{/branch}","tags_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/tags","blobs_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/languages","stargazers_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/stargazers","contributors_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/contributors","subscribers_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/subscribers","subscription_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/subscription","commits_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/contents/{+path}","compare_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/merges","archive_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/downloads","issues_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/issues{/number}","pulls_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/labels{/name}","releases_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/releases{/id}","deployments_url":"https://api.github.com/repos/JohannesHoppe/angular-cli/deployments","created_at":"2016-05-13T17:26:20Z","updated_at":"2016-05-13T17:26:22Z","pushed_at":"2016-05-17T17:15:28Z","git_url":"git://github.com/JohannesHoppe/angular-cli.git","ssh_url":"git@github.com:JohannesHoppe/angular-cli.git","clone_url":"https://github.com/JohannesHoppe/angular-cli.git","svn_url":"https://github.com/JohannesHoppe/angular-cli","homepage":"","size":835,"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":"angular:master","ref":"master","sha":"ba120c234e3f160b74a30a1559772b2fb7b695c5","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":36891867,"name":"angular-cli","full_name":"angular/angular-cli","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/angular-cli","description":"CLI tool for Angular2","fork":false,"url":"https://api.github.com/repos/angular/angular-cli","forks_url":"https://api.github.com/repos/angular/angular-cli/forks","keys_url":"https://api.github.com/repos/angular/angular-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/angular-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/angular-cli/teams","hooks_url":"https://api.github.com/repos/angular/angular-cli/hooks","issue_events_url":"https://api.github.com/repos/angular/angular-cli/issues/events{/number}","events_url":"https://api.github.com/repos/angular/angular-cli/events","assignees_url":"https://api.github.com/repos/angular/angular-cli/assignees{/user}","branches_url":"https://api.github.com/repos/angular/angular-cli/branches{/branch}","tags_url":"https://api.github.com/repos/angular/angular-cli/tags","blobs_url":"https://api.github.com/repos/angular/angular-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/angular-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/angular-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/angular-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/angular-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/angular-cli/languages","stargazers_url":"https://api.github.com/repos/angular/angular-cli/stargazers","contributors_url":"https://api.github.com/repos/angular/angular-cli/contributors","subscribers_url":"https://api.github.com/repos/angular/angular-cli/subscribers","subscription_url":"https://api.github.com/repos/angular/angular-cli/subscription","commits_url":"https://api.github.com/repos/angular/angular-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/angular-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/angular-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/angular-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/angular-cli/contents/{+path}","compare_url":"https://api.github.com/repos/angular/angular-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/angular-cli/merges","archive_url":"https://api.github.com/repos/angular/angular-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/angular-cli/downloads","issues_url":"https://api.github.com/repos/angular/angular-cli/issues{/number}","pulls_url":"https://api.github.com/repos/angular/angular-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/angular-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/angular-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/angular-cli/labels{/name}","releases_url":"https://api.github.com/repos/angular/angular-cli/releases{/id}","deployments_url":"https://api.github.com/repos/angular/angular-cli/deployments","created_at":"2015-06-04T19:49:37Z","updated_at":"2016-05-17T17:27:49Z","pushed_at":"2016-05-17T17:15:28Z","git_url":"git://github.com/angular/angular-cli.git","ssh_url":"git@github.com:angular/angular-cli.git","clone_url":"https://github.com/angular/angular-cli.git","svn_url":"https://github.com/angular/angular-cli","homepage":"","size":1237,"stargazers_count":1493,"watchers_count":1493,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":197,"mirror_url":null,"open_issues_count":89,"forks":197,"open_issues":89,"watchers":1493,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular-cli/pulls/802"},"html":{"href":"https://github.com/angular/angular-cli/pull/802"},"issue":{"href":"https://api.github.com/repos/angular/angular-cli/issues/802"},"comments":{"href":"https://api.github.com/repos/angular/angular-cli/issues/802/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular-cli/pulls/802/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/angular-cli/pulls/802/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular-cli/statuses/8652d3c946c36ca86d99734abc1d8ad05c138afd"}}}}