{"action":"created","comment":{"url":"https://api.github.com/repos/concourse/git-resource/pulls/comments/90566089","pull_request_review_id":11085657,"id":90566089,"diff_hunk":"@@ -293,6 +293,33 @@ it_can_put_and_set_git_config() {\n   mv ~/.gitconfig.orig ~/.gitconfig\n }\n \n+it_can_put_and_force_the_push() {\n+  local repo1=$(init_repo)\n+\n+  local src=$(mktemp -d $TMPDIR/put-src.XXXXXX)\n+  local repo2=$src/repo\n+  git clone $repo1 $repo2\n+\n+  local ref=$(make_commit $repo2)\n+  make_commit $repo1\n+  # cannot push to repo while it's checked out to a branch\n+  git -C $repo1 checkout refs/heads/master","path":"test/put.sh","position":null,"original_position":14,"commit_id":"46ee69855b38ed2f26f27014029231aa4dc258fa","original_commit_id":"b9ddcb747d69ea2e8496507f211096208dfcbf5b","user":{"login":"vito","id":1880,"avatar_url":"https://avatars.githubusercontent.com/u/1880?v=3","gravatar_id":"","url":"https://api.github.com/users/vito","html_url":"https://github.com/vito","followers_url":"https://api.github.com/users/vito/followers","following_url":"https://api.github.com/users/vito/following{/other_user}","gists_url":"https://api.github.com/users/vito/gists{/gist_id}","starred_url":"https://api.github.com/users/vito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vito/subscriptions","organizations_url":"https://api.github.com/users/vito/orgs","repos_url":"https://api.github.com/users/vito/repos","events_url":"https://api.github.com/users/vito/events{/privacy}","received_events_url":"https://api.github.com/users/vito/received_events","type":"User","site_admin":false},"body":"Oh my bad - I misread and thought this commented line was setting up the force-push case. I see now that it's doing exactly what I described.","created_at":"2016-12-02T00:18:35Z","updated_at":"2016-12-02T00:18:35Z","html_url":"https://github.com/concourse/git-resource/pull/97#discussion_r90566089","pull_request_url":"https://api.github.com/repos/concourse/git-resource/pulls/97","_links":{"self":{"href":"https://api.github.com/repos/concourse/git-resource/pulls/comments/90566089"},"html":{"href":"https://github.com/concourse/git-resource/pull/97#discussion_r90566089"},"pull_request":{"href":"https://api.github.com/repos/concourse/git-resource/pulls/97"}}},"pull_request":{"url":"https://api.github.com/repos/concourse/git-resource/pulls/97","id":96176970,"html_url":"https://github.com/concourse/git-resource/pull/97","diff_url":"https://github.com/concourse/git-resource/pull/97.diff","patch_url":"https://github.com/concourse/git-resource/pull/97.patch","issue_url":"https://api.github.com/repos/concourse/git-resource/issues/97","number":97,"state":"open","locked":false,"title":"Add the ability to force push a branch.","user":{"login":"dfedde-pivotal","id":22243277,"avatar_url":"https://avatars.githubusercontent.com/u/22243277?v=3","gravatar_id":"","url":"https://api.github.com/users/dfedde-pivotal","html_url":"https://github.com/dfedde-pivotal","followers_url":"https://api.github.com/users/dfedde-pivotal/followers","following_url":"https://api.github.com/users/dfedde-pivotal/following{/other_user}","gists_url":"https://api.github.com/users/dfedde-pivotal/gists{/gist_id}","starred_url":"https://api.github.com/users/dfedde-pivotal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfedde-pivotal/subscriptions","organizations_url":"https://api.github.com/users/dfedde-pivotal/orgs","repos_url":"https://api.github.com/users/dfedde-pivotal/repos","events_url":"https://api.github.com/users/dfedde-pivotal/events{/privacy}","received_events_url":"https://api.github.com/users/dfedde-pivotal/received_events","type":"User","site_admin":false},"body":"Add the 'force' option to the put script allowing the user to force\r\nthe branch to be pushed to the remote.","created_at":"2016-12-01T21:46:20Z","updated_at":"2016-12-02T00:18:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"13be1ef22c7205eeddc9ab33eb2a03a90e986b43","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/concourse/git-resource/pulls/97/commits","review_comments_url":"https://api.github.com/repos/concourse/git-resource/pulls/97/comments","review_comment_url":"https://api.github.com/repos/concourse/git-resource/pulls/comments{/number}","comments_url":"https://api.github.com/repos/concourse/git-resource/issues/97/comments","statuses_url":"https://api.github.com/repos/concourse/git-resource/statuses/46ee69855b38ed2f26f27014029231aa4dc258fa","head":{"label":"dfedde-pivotal:master","ref":"master","sha":"46ee69855b38ed2f26f27014029231aa4dc258fa","user":{"login":"dfedde-pivotal","id":22243277,"avatar_url":"https://avatars.githubusercontent.com/u/22243277?v=3","gravatar_id":"","url":"https://api.github.com/users/dfedde-pivotal","html_url":"https://github.com/dfedde-pivotal","followers_url":"https://api.github.com/users/dfedde-pivotal/followers","following_url":"https://api.github.com/users/dfedde-pivotal/following{/other_user}","gists_url":"https://api.github.com/users/dfedde-pivotal/gists{/gist_id}","starred_url":"https://api.github.com/users/dfedde-pivotal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfedde-pivotal/subscriptions","organizations_url":"https://api.github.com/users/dfedde-pivotal/orgs","repos_url":"https://api.github.com/users/dfedde-pivotal/repos","events_url":"https://api.github.com/users/dfedde-pivotal/events{/privacy}","received_events_url":"https://api.github.com/users/dfedde-pivotal/received_events","type":"User","site_admin":false},"repo":{"id":75323819,"name":"git-resource","full_name":"dfedde-pivotal/git-resource","owner":{"login":"dfedde-pivotal","id":22243277,"avatar_url":"https://avatars.githubusercontent.com/u/22243277?v=3","gravatar_id":"","url":"https://api.github.com/users/dfedde-pivotal","html_url":"https://github.com/dfedde-pivotal","followers_url":"https://api.github.com/users/dfedde-pivotal/followers","following_url":"https://api.github.com/users/dfedde-pivotal/following{/other_user}","gists_url":"https://api.github.com/users/dfedde-pivotal/gists{/gist_id}","starred_url":"https://api.github.com/users/dfedde-pivotal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfedde-pivotal/subscriptions","organizations_url":"https://api.github.com/users/dfedde-pivotal/orgs","repos_url":"https://api.github.com/users/dfedde-pivotal/repos","events_url":"https://api.github.com/users/dfedde-pivotal/events{/privacy}","received_events_url":"https://api.github.com/users/dfedde-pivotal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dfedde-pivotal/git-resource","description":"tracks commits in a branch of a Git repository","fork":true,"url":"https://api.github.com/repos/dfedde-pivotal/git-resource","forks_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/forks","keys_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/teams","hooks_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/hooks","issue_events_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/issues/events{/number}","events_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/events","assignees_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/assignees{/user}","branches_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/branches{/branch}","tags_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/tags","blobs_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/git/refs{/sha}","trees_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/statuses/{sha}","languages_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/languages","stargazers_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/stargazers","contributors_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/contributors","subscribers_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/subscribers","subscription_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/subscription","commits_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/commits{/sha}","git_commits_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/git/commits{/sha}","comments_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/comments{/number}","issue_comment_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/issues/comments{/number}","contents_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/contents/{+path}","compare_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/merges","archive_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/downloads","issues_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/issues{/number}","pulls_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/pulls{/number}","milestones_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/milestones{/number}","notifications_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/labels{/name}","releases_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/releases{/id}","deployments_url":"https://api.github.com/repos/dfedde-pivotal/git-resource/deployments","created_at":"2016-12-01T19:09:03Z","updated_at":"2016-12-01T19:09:04Z","pushed_at":"2016-12-01T22:49:41Z","git_url":"git://github.com/dfedde-pivotal/git-resource.git","ssh_url":"git@github.com:dfedde-pivotal/git-resource.git","clone_url":"https://github.com/dfedde-pivotal/git-resource.git","svn_url":"https://github.com/dfedde-pivotal/git-resource","homepage":"https://concourse.ci","size":176,"stargazers_count":0,"watchers_count":0,"language":"Shell","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":"concourse:master","ref":"master","sha":"49e289f0d2d4fe1f40ae59affe271a241d862cc7","user":{"login":"concourse","id":7809479,"avatar_url":"https://avatars.githubusercontent.com/u/7809479?v=3","gravatar_id":"","url":"https://api.github.com/users/concourse","html_url":"https://github.com/concourse","followers_url":"https://api.github.com/users/concourse/followers","following_url":"https://api.github.com/users/concourse/following{/other_user}","gists_url":"https://api.github.com/users/concourse/gists{/gist_id}","starred_url":"https://api.github.com/users/concourse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concourse/subscriptions","organizations_url":"https://api.github.com/users/concourse/orgs","repos_url":"https://api.github.com/users/concourse/repos","events_url":"https://api.github.com/users/concourse/events{/privacy}","received_events_url":"https://api.github.com/users/concourse/received_events","type":"Organization","site_admin":false},"repo":{"id":24299150,"name":"git-resource","full_name":"concourse/git-resource","owner":{"login":"concourse","id":7809479,"avatar_url":"https://avatars.githubusercontent.com/u/7809479?v=3","gravatar_id":"","url":"https://api.github.com/users/concourse","html_url":"https://github.com/concourse","followers_url":"https://api.github.com/users/concourse/followers","following_url":"https://api.github.com/users/concourse/following{/other_user}","gists_url":"https://api.github.com/users/concourse/gists{/gist_id}","starred_url":"https://api.github.com/users/concourse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concourse/subscriptions","organizations_url":"https://api.github.com/users/concourse/orgs","repos_url":"https://api.github.com/users/concourse/repos","events_url":"https://api.github.com/users/concourse/events{/privacy}","received_events_url":"https://api.github.com/users/concourse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/concourse/git-resource","description":"tracks commits in a branch of a Git repository","fork":false,"url":"https://api.github.com/repos/concourse/git-resource","forks_url":"https://api.github.com/repos/concourse/git-resource/forks","keys_url":"https://api.github.com/repos/concourse/git-resource/keys{/key_id}","collaborators_url":"https://api.github.com/repos/concourse/git-resource/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/concourse/git-resource/teams","hooks_url":"https://api.github.com/repos/concourse/git-resource/hooks","issue_events_url":"https://api.github.com/repos/concourse/git-resource/issues/events{/number}","events_url":"https://api.github.com/repos/concourse/git-resource/events","assignees_url":"https://api.github.com/repos/concourse/git-resource/assignees{/user}","branches_url":"https://api.github.com/repos/concourse/git-resource/branches{/branch}","tags_url":"https://api.github.com/repos/concourse/git-resource/tags","blobs_url":"https://api.github.com/repos/concourse/git-resource/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/concourse/git-resource/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/concourse/git-resource/git/refs{/sha}","trees_url":"https://api.github.com/repos/concourse/git-resource/git/trees{/sha}","statuses_url":"https://api.github.com/repos/concourse/git-resource/statuses/{sha}","languages_url":"https://api.github.com/repos/concourse/git-resource/languages","stargazers_url":"https://api.github.com/repos/concourse/git-resource/stargazers","contributors_url":"https://api.github.com/repos/concourse/git-resource/contributors","subscribers_url":"https://api.github.com/repos/concourse/git-resource/subscribers","subscription_url":"https://api.github.com/repos/concourse/git-resource/subscription","commits_url":"https://api.github.com/repos/concourse/git-resource/commits{/sha}","git_commits_url":"https://api.github.com/repos/concourse/git-resource/git/commits{/sha}","comments_url":"https://api.github.com/repos/concourse/git-resource/comments{/number}","issue_comment_url":"https://api.github.com/repos/concourse/git-resource/issues/comments{/number}","contents_url":"https://api.github.com/repos/concourse/git-resource/contents/{+path}","compare_url":"https://api.github.com/repos/concourse/git-resource/compare/{base}...{head}","merges_url":"https://api.github.com/repos/concourse/git-resource/merges","archive_url":"https://api.github.com/repos/concourse/git-resource/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/concourse/git-resource/downloads","issues_url":"https://api.github.com/repos/concourse/git-resource/issues{/number}","pulls_url":"https://api.github.com/repos/concourse/git-resource/pulls{/number}","milestones_url":"https://api.github.com/repos/concourse/git-resource/milestones{/number}","notifications_url":"https://api.github.com/repos/concourse/git-resource/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/concourse/git-resource/labels{/name}","releases_url":"https://api.github.com/repos/concourse/git-resource/releases{/id}","deployments_url":"https://api.github.com/repos/concourse/git-resource/deployments","created_at":"2014-09-21T18:16:16Z","updated_at":"2016-11-30T09:34:15Z","pushed_at":"2016-12-01T22:49:41Z","git_url":"git://github.com/concourse/git-resource.git","ssh_url":"git@github.com:concourse/git-resource.git","clone_url":"https://github.com/concourse/git-resource.git","svn_url":"https://github.com/concourse/git-resource","homepage":"https://concourse.ci","size":335,"stargazers_count":18,"watchers_count":18,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":58,"mirror_url":null,"open_issues_count":21,"forks":58,"open_issues":21,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/concourse/git-resource/pulls/97"},"html":{"href":"https://github.com/concourse/git-resource/pull/97"},"issue":{"href":"https://api.github.com/repos/concourse/git-resource/issues/97"},"comments":{"href":"https://api.github.com/repos/concourse/git-resource/issues/97/comments"},"review_comments":{"href":"https://api.github.com/repos/concourse/git-resource/pulls/97/comments"},"review_comment":{"href":"https://api.github.com/repos/concourse/git-resource/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/concourse/git-resource/pulls/97/commits"},"statuses":{"href":"https://api.github.com/repos/concourse/git-resource/statuses/46ee69855b38ed2f26f27014029231aa4dc258fa"}}}}
{"actor":{"display_login":"vito"}}