{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/source-to-image/pulls/comments/72137631","id":72137631,"diff_hunk":"@@ -14,7 +14,12 @@ func createLocalGitDirectory(t *testing.T) string {\n \tif err != nil {\n \t\tt.Error(err)\n \t}\n-\tos.Mkdir(filepath.Join(dir, \".git\"), 0600)\n+\tos.MkdirAll(filepath.Join(dir, \".git/refs/heads\"), 0777)\n+\tos.MkdirAll(filepath.Join(dir, \".git/refs/remotes\"), 0777)\n+\tos.MkdirAll(filepath.Join(dir, \".git/branches\"), 0777)\n+\tos.MkdirAll(filepath.Join(dir, \".git/objects/foo\"), 0777)\n+\tos.Create(filepath.Join(dir, \".git/objects/foo\") + \"bar\")\n+\t//os.Create(filepath.Join(dir, \".git/refs/heads\") + \"master\")","path":"pkg/scm/scm_test.go","position":10,"original_position":10,"commit_id":"4d7f7087d35573d542667c034819de27a390c03b","original_commit_id":"4d7f7087d35573d542667c034819de27a390c03b","user":{"login":"oatmealraisin","id":6402382,"avatar_url":"https://avatars.githubusercontent.com/u/6402382?v=3","gravatar_id":"","url":"https://api.github.com/users/oatmealraisin","html_url":"https://github.com/oatmealraisin","followers_url":"https://api.github.com/users/oatmealraisin/followers","following_url":"https://api.github.com/users/oatmealraisin/following{/other_user}","gists_url":"https://api.github.com/users/oatmealraisin/gists{/gist_id}","starred_url":"https://api.github.com/users/oatmealraisin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oatmealraisin/subscriptions","organizations_url":"https://api.github.com/users/oatmealraisin/orgs","repos_url":"https://api.github.com/users/oatmealraisin/repos","events_url":"https://api.github.com/users/oatmealraisin/events{/privacy}","received_events_url":"https://api.github.com/users/oatmealraisin/received_events","type":"User","site_admin":false},"body":"Thanks for the feedback!  I forgot to take this out.  Since we already create a `bar` object, it is a \"valid\" git repository, because that would represent a commit.  I'll add a comment explaining that","created_at":"2016-07-25T20:25:46Z","updated_at":"2016-07-25T20:25:46Z","html_url":"https://github.com/openshift/source-to-image/pull/552#discussion_r72137631","pull_request_url":"https://api.github.com/repos/openshift/source-to-image/pulls/552","_links":{"self":{"href":"https://api.github.com/repos/openshift/source-to-image/pulls/comments/72137631"},"html":{"href":"https://github.com/openshift/source-to-image/pull/552#discussion_r72137631"},"pull_request":{"href":"https://api.github.com/repos/openshift/source-to-image/pulls/552"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/source-to-image/pulls/552","id":78516824,"html_url":"https://github.com/openshift/source-to-image/pull/552","diff_url":"https://github.com/openshift/source-to-image/pull/552.diff","patch_url":"https://github.com/openshift/source-to-image/pull/552.patch","issue_url":"https://api.github.com/repos/openshift/source-to-image/issues/552","number":552,"state":"open","locked":false,"title":"Added checks for existing content is git repo","user":{"login":"oatmealraisin","id":6402382,"avatar_url":"https://avatars.githubusercontent.com/u/6402382?v=3","gravatar_id":"","url":"https://api.github.com/users/oatmealraisin","html_url":"https://github.com/oatmealraisin","followers_url":"https://api.github.com/users/oatmealraisin/followers","following_url":"https://api.github.com/users/oatmealraisin/following{/other_user}","gists_url":"https://api.github.com/users/oatmealraisin/gists{/gist_id}","starred_url":"https://api.github.com/users/oatmealraisin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oatmealraisin/subscriptions","organizations_url":"https://api.github.com/users/oatmealraisin/orgs","repos_url":"https://api.github.com/users/oatmealraisin/repos","events_url":"https://api.github.com/users/oatmealraisin/events{/privacy}","received_events_url":"https://api.github.com/users/oatmealraisin/received_events","type":"User","site_admin":false},"body":"This fixes an error when the git repo is empty, e.g. the user only ran\r\n`git init`.  If the repo is empty, we use system copy commands instead\r\nof git commands, and warn the user.\r\n\r\nAlso added warnings for if there is a .git directory in the project, but\r\na Git binary is not installed.\r\n\r\nCurrently working on tests, just posting this for discussion\r\n@bparees \r\n\r\nOld output, git installed:\r\n```\r\n\r\n---> Installing application source ...\r\nERROR: cp: cannot stat '/tmp/src/.': No such file or directory\r\n\r\nERROR: An error occurred: non-zero (13) exit code from openshift/ruby-22-centos7\r\n```\r\n\r\nOld output, git not installed:\r\n```\r\n\r\n---> Installing application source ...\r\n---> Building your Ruby application from source ...\r\nWARNING: Rubygem Rack is not installed in the present image.\r\nAdd rack to your Gemfile in order to start the web server.\r\n\r\n```\r\n\r\nNew output, git installed:\r\n```\r\nWarning: file:///home/rymurphy/documents/projects/go/src/github.com/openshift/source-to-image/asdf is a Git repository, but is empty.\r\n\r\n---> Installing application source ...\r\n---> Building your Ruby application from source ...\r\nWARNING: Rubygem Rack is not installed in the present image.\r\nAdd rack to your Gemfile in order to start the web server.\r\n\r\n```\r\n\r\nNew output, git not installed\r\n```\r\nWarning: file:///home/rymurphy/documents/projects/go/src/github.com/openshift/source-to-image/asdf is a Git repository, but you do not have git installed.\r\nWarning: file:///home/rymurphy/documents/projects/go/src/github.com/openshift/source-to-image/asdf is a Git repository, but is empty.\r\n\r\n---> Installing application source ...\r\n---> Building your Ruby application from source ...\r\nWARNING: Rubygem Rack is not installed in the present image.\r\nAdd rack to your Gemfile in order to start the web server.\r\n\r\n```\r\nFixes #298 ","created_at":"2016-07-22T18:04:12Z","updated_at":"2016-07-25T20:25:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2316dc7b4fcfa4af0b309600d386c15a0b27769f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openshift/source-to-image/pulls/552/commits","review_comments_url":"https://api.github.com/repos/openshift/source-to-image/pulls/552/comments","review_comment_url":"https://api.github.com/repos/openshift/source-to-image/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/source-to-image/issues/552/comments","statuses_url":"https://api.github.com/repos/openshift/source-to-image/statuses/4d7f7087d35573d542667c034819de27a390c03b","head":{"label":"oatmealraisin:298/rymurphy","ref":"298/rymurphy","sha":"4d7f7087d35573d542667c034819de27a390c03b","user":{"login":"oatmealraisin","id":6402382,"avatar_url":"https://avatars.githubusercontent.com/u/6402382?v=3","gravatar_id":"","url":"https://api.github.com/users/oatmealraisin","html_url":"https://github.com/oatmealraisin","followers_url":"https://api.github.com/users/oatmealraisin/followers","following_url":"https://api.github.com/users/oatmealraisin/following{/other_user}","gists_url":"https://api.github.com/users/oatmealraisin/gists{/gist_id}","starred_url":"https://api.github.com/users/oatmealraisin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oatmealraisin/subscriptions","organizations_url":"https://api.github.com/users/oatmealraisin/orgs","repos_url":"https://api.github.com/users/oatmealraisin/repos","events_url":"https://api.github.com/users/oatmealraisin/events{/privacy}","received_events_url":"https://api.github.com/users/oatmealraisin/received_events","type":"User","site_admin":false},"repo":{"id":60552516,"name":"source-to-image","full_name":"oatmealraisin/source-to-image","owner":{"login":"oatmealraisin","id":6402382,"avatar_url":"https://avatars.githubusercontent.com/u/6402382?v=3","gravatar_id":"","url":"https://api.github.com/users/oatmealraisin","html_url":"https://github.com/oatmealraisin","followers_url":"https://api.github.com/users/oatmealraisin/followers","following_url":"https://api.github.com/users/oatmealraisin/following{/other_user}","gists_url":"https://api.github.com/users/oatmealraisin/gists{/gist_id}","starred_url":"https://api.github.com/users/oatmealraisin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oatmealraisin/subscriptions","organizations_url":"https://api.github.com/users/oatmealraisin/orgs","repos_url":"https://api.github.com/users/oatmealraisin/repos","events_url":"https://api.github.com/users/oatmealraisin/events{/privacy}","received_events_url":"https://api.github.com/users/oatmealraisin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oatmealraisin/source-to-image","description":"A tool for building/building artifacts from source and injecting into docker images","fork":true,"url":"https://api.github.com/repos/oatmealraisin/source-to-image","forks_url":"https://api.github.com/repos/oatmealraisin/source-to-image/forks","keys_url":"https://api.github.com/repos/oatmealraisin/source-to-image/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oatmealraisin/source-to-image/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oatmealraisin/source-to-image/teams","hooks_url":"https://api.github.com/repos/oatmealraisin/source-to-image/hooks","issue_events_url":"https://api.github.com/repos/oatmealraisin/source-to-image/issues/events{/number}","events_url":"https://api.github.com/repos/oatmealraisin/source-to-image/events","assignees_url":"https://api.github.com/repos/oatmealraisin/source-to-image/assignees{/user}","branches_url":"https://api.github.com/repos/oatmealraisin/source-to-image/branches{/branch}","tags_url":"https://api.github.com/repos/oatmealraisin/source-to-image/tags","blobs_url":"https://api.github.com/repos/oatmealraisin/source-to-image/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oatmealraisin/source-to-image/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oatmealraisin/source-to-image/git/refs{/sha}","trees_url":"https://api.github.com/repos/oatmealraisin/source-to-image/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oatmealraisin/source-to-image/statuses/{sha}","languages_url":"https://api.github.com/repos/oatmealraisin/source-to-image/languages","stargazers_url":"https://api.github.com/repos/oatmealraisin/source-to-image/stargazers","contributors_url":"https://api.github.com/repos/oatmealraisin/source-to-image/contributors","subscribers_url":"https://api.github.com/repos/oatmealraisin/source-to-image/subscribers","subscription_url":"https://api.github.com/repos/oatmealraisin/source-to-image/subscription","commits_url":"https://api.github.com/repos/oatmealraisin/source-to-image/commits{/sha}","git_commits_url":"https://api.github.com/repos/oatmealraisin/source-to-image/git/commits{/sha}","comments_url":"https://api.github.com/repos/oatmealraisin/source-to-image/comments{/number}","issue_comment_url":"https://api.github.com/repos/oatmealraisin/source-to-image/issues/comments{/number}","contents_url":"https://api.github.com/repos/oatmealraisin/source-to-image/contents/{+path}","compare_url":"https://api.github.com/repos/oatmealraisin/source-to-image/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oatmealraisin/source-to-image/merges","archive_url":"https://api.github.com/repos/oatmealraisin/source-to-image/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oatmealraisin/source-to-image/downloads","issues_url":"https://api.github.com/repos/oatmealraisin/source-to-image/issues{/number}","pulls_url":"https://api.github.com/repos/oatmealraisin/source-to-image/pulls{/number}","milestones_url":"https://api.github.com/repos/oatmealraisin/source-to-image/milestones{/number}","notifications_url":"https://api.github.com/repos/oatmealraisin/source-to-image/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oatmealraisin/source-to-image/labels{/name}","releases_url":"https://api.github.com/repos/oatmealraisin/source-to-image/releases{/id}","deployments_url":"https://api.github.com/repos/oatmealraisin/source-to-image/deployments","created_at":"2016-06-06T18:48:03Z","updated_at":"2016-06-06T18:48:05Z","pushed_at":"2016-07-25T16:15:02Z","git_url":"git://github.com/oatmealraisin/source-to-image.git","ssh_url":"git@github.com:oatmealraisin/source-to-image.git","clone_url":"https://github.com/oatmealraisin/source-to-image.git","svn_url":"https://github.com/oatmealraisin/source-to-image","homepage":"","size":2791,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"openshift:master","ref":"master","sha":"49dac82c5f1521e95980c71ff0e092b991fc1b09","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":16323162,"name":"source-to-image","full_name":"openshift/source-to-image","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/source-to-image","description":"A tool for building/building artifacts from source and injecting into docker images","fork":false,"url":"https://api.github.com/repos/openshift/source-to-image","forks_url":"https://api.github.com/repos/openshift/source-to-image/forks","keys_url":"https://api.github.com/repos/openshift/source-to-image/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/source-to-image/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/source-to-image/teams","hooks_url":"https://api.github.com/repos/openshift/source-to-image/hooks","issue_events_url":"https://api.github.com/repos/openshift/source-to-image/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/source-to-image/events","assignees_url":"https://api.github.com/repos/openshift/source-to-image/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/source-to-image/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/source-to-image/tags","blobs_url":"https://api.github.com/repos/openshift/source-to-image/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/source-to-image/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/source-to-image/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/source-to-image/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/source-to-image/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/source-to-image/languages","stargazers_url":"https://api.github.com/repos/openshift/source-to-image/stargazers","contributors_url":"https://api.github.com/repos/openshift/source-to-image/contributors","subscribers_url":"https://api.github.com/repos/openshift/source-to-image/subscribers","subscription_url":"https://api.github.com/repos/openshift/source-to-image/subscription","commits_url":"https://api.github.com/repos/openshift/source-to-image/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/source-to-image/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/source-to-image/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/source-to-image/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/source-to-image/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/source-to-image/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/source-to-image/merges","archive_url":"https://api.github.com/repos/openshift/source-to-image/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/source-to-image/downloads","issues_url":"https://api.github.com/repos/openshift/source-to-image/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/source-to-image/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/source-to-image/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/source-to-image/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/source-to-image/labels{/name}","releases_url":"https://api.github.com/repos/openshift/source-to-image/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/source-to-image/deployments","created_at":"2014-01-28T19:32:40Z","updated_at":"2016-07-25T01:40:52Z","pushed_at":"2016-07-25T19:18:16Z","git_url":"git://github.com/openshift/source-to-image.git","ssh_url":"git@github.com:openshift/source-to-image.git","clone_url":"https://github.com/openshift/source-to-image.git","svn_url":"https://github.com/openshift/source-to-image","homepage":"","size":11685,"stargazers_count":269,"watchers_count":269,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":129,"mirror_url":null,"open_issues_count":22,"forks":129,"open_issues":22,"watchers":269,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/source-to-image/pulls/552"},"html":{"href":"https://github.com/openshift/source-to-image/pull/552"},"issue":{"href":"https://api.github.com/repos/openshift/source-to-image/issues/552"},"comments":{"href":"https://api.github.com/repos/openshift/source-to-image/issues/552/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/source-to-image/pulls/552/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/source-to-image/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/source-to-image/pulls/552/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/source-to-image/statuses/4d7f7087d35573d542667c034819de27a390c03b"}}}}
{"actor":{"display_login":"oatmealraisin"}}