{"action":"closed","number":90,"pull_request":{"url":"https://api.github.com/repos/debops/debops/pulls/90","id":28228775,"html_url":"https://github.com/debops/debops/pull/90","diff_url":"https://github.com/debops/debops/pull/90.diff","patch_url":"https://github.com/debops/debops/pull/90.patch","issue_url":"https://api.github.com/repos/debops/debops/issues/90","number":90,"state":"closed","locked":false,"title":"Use `git ref-parse` for geting the commit-hashes instead of do-it-outself.","user":{"login":"htgoebel","id":784161,"avatar_url":"https://avatars.githubusercontent.com/u/784161?v=3","gravatar_id":"","url":"https://api.github.com/users/htgoebel","html_url":"https://github.com/htgoebel","followers_url":"https://api.github.com/users/htgoebel/followers","following_url":"https://api.github.com/users/htgoebel/following{/other_user}","gists_url":"https://api.github.com/users/htgoebel/gists{/gist_id}","starred_url":"https://api.github.com/users/htgoebel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htgoebel/subscriptions","organizations_url":"https://api.github.com/users/htgoebel/orgs","repos_url":"https://api.github.com/users/htgoebel/repos","events_url":"https://api.github.com/users/htgoebel/events{/privacy}","received_events_url":"https://api.github.com/users/htgoebel/received_events","type":"User","site_admin":false},"body":"This leaves the dirty work for handling corner-cases to git.\r\n\r\nThis solves this issue:\r\nAfter running `git gc --aggressive` on there is no file `.git/refs/head/master`, so debops-update crashes. This command removes `.git/refs/head/master` and refs would have to be looked up in `.gi/packed-refs`.\r\n\r\nWhen trying to solve this, I first found the commend `git show-ref` resp. `git show-ref --heads`. But this still does not give use the HEAD branch. But `git rev-parse HEAD` directly gives us the current sha of the head branch – letting git do the whole dirty work.\r\n\r\nAs a plus, this is future proof and we do not need to care about file format changes ","created_at":"2015-01-28T20:58:09Z","updated_at":"2015-01-28T21:10:39Z","closed_at":"2015-01-28T21:10:39Z","merged_at":"2015-01-28T21:10:39Z","merge_commit_sha":"35bbad63d916e4484ada32cc0b143aae409a6155","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/debops/debops/pulls/90/commits","review_comments_url":"https://api.github.com/repos/debops/debops/pulls/90/comments","review_comment_url":"https://api.github.com/repos/debops/debops/pulls/comments/{number}","comments_url":"https://api.github.com/repos/debops/debops/issues/90/comments","statuses_url":"https://api.github.com/repos/debops/debops/statuses/476e640b82b26112f20a45b2331a8bcff0def372","head":{"label":"htgoebel:master","ref":"master","sha":"476e640b82b26112f20a45b2331a8bcff0def372","user":{"login":"htgoebel","id":784161,"avatar_url":"https://avatars.githubusercontent.com/u/784161?v=3","gravatar_id":"","url":"https://api.github.com/users/htgoebel","html_url":"https://github.com/htgoebel","followers_url":"https://api.github.com/users/htgoebel/followers","following_url":"https://api.github.com/users/htgoebel/following{/other_user}","gists_url":"https://api.github.com/users/htgoebel/gists{/gist_id}","starred_url":"https://api.github.com/users/htgoebel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htgoebel/subscriptions","organizations_url":"https://api.github.com/users/htgoebel/orgs","repos_url":"https://api.github.com/users/htgoebel/repos","events_url":"https://api.github.com/users/htgoebel/events{/privacy}","received_events_url":"https://api.github.com/users/htgoebel/received_events","type":"User","site_admin":false},"repo":{"id":27142269,"name":"debops","full_name":"htgoebel/debops","owner":{"login":"htgoebel","id":784161,"avatar_url":"https://avatars.githubusercontent.com/u/784161?v=3","gravatar_id":"","url":"https://api.github.com/users/htgoebel","html_url":"https://github.com/htgoebel","followers_url":"https://api.github.com/users/htgoebel/followers","following_url":"https://api.github.com/users/htgoebel/following{/other_user}","gists_url":"https://api.github.com/users/htgoebel/gists{/gist_id}","starred_url":"https://api.github.com/users/htgoebel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htgoebel/subscriptions","organizations_url":"https://api.github.com/users/htgoebel/orgs","repos_url":"https://api.github.com/users/htgoebel/repos","events_url":"https://api.github.com/users/htgoebel/events{/privacy}","received_events_url":"https://api.github.com/users/htgoebel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/htgoebel/debops","description":"Your Debian-based data center in a box - ","fork":true,"url":"https://api.github.com/repos/htgoebel/debops","forks_url":"https://api.github.com/repos/htgoebel/debops/forks","keys_url":"https://api.github.com/repos/htgoebel/debops/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htgoebel/debops/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htgoebel/debops/teams","hooks_url":"https://api.github.com/repos/htgoebel/debops/hooks","issue_events_url":"https://api.github.com/repos/htgoebel/debops/issues/events{/number}","events_url":"https://api.github.com/repos/htgoebel/debops/events","assignees_url":"https://api.github.com/repos/htgoebel/debops/assignees{/user}","branches_url":"https://api.github.com/repos/htgoebel/debops/branches{/branch}","tags_url":"https://api.github.com/repos/htgoebel/debops/tags","blobs_url":"https://api.github.com/repos/htgoebel/debops/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htgoebel/debops/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htgoebel/debops/git/refs{/sha}","trees_url":"https://api.github.com/repos/htgoebel/debops/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htgoebel/debops/statuses/{sha}","languages_url":"https://api.github.com/repos/htgoebel/debops/languages","stargazers_url":"https://api.github.com/repos/htgoebel/debops/stargazers","contributors_url":"https://api.github.com/repos/htgoebel/debops/contributors","subscribers_url":"https://api.github.com/repos/htgoebel/debops/subscribers","subscription_url":"https://api.github.com/repos/htgoebel/debops/subscription","commits_url":"https://api.github.com/repos/htgoebel/debops/commits{/sha}","git_commits_url":"https://api.github.com/repos/htgoebel/debops/git/commits{/sha}","comments_url":"https://api.github.com/repos/htgoebel/debops/comments{/number}","issue_comment_url":"https://api.github.com/repos/htgoebel/debops/issues/comments/{number}","contents_url":"https://api.github.com/repos/htgoebel/debops/contents/{+path}","compare_url":"https://api.github.com/repos/htgoebel/debops/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htgoebel/debops/merges","archive_url":"https://api.github.com/repos/htgoebel/debops/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htgoebel/debops/downloads","issues_url":"https://api.github.com/repos/htgoebel/debops/issues{/number}","pulls_url":"https://api.github.com/repos/htgoebel/debops/pulls{/number}","milestones_url":"https://api.github.com/repos/htgoebel/debops/milestones{/number}","notifications_url":"https://api.github.com/repos/htgoebel/debops/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htgoebel/debops/labels{/name}","releases_url":"https://api.github.com/repos/htgoebel/debops/releases{/id}","created_at":"2014-11-25T19:28:24Z","updated_at":"2015-01-28T20:59:06Z","pushed_at":"2015-01-28T20:59:06Z","git_url":"git://github.com/htgoebel/debops.git","ssh_url":"git@github.com:htgoebel/debops.git","clone_url":"https://github.com/htgoebel/debops.git","svn_url":"https://github.com/htgoebel/debops","homepage":"http://debops.org/","size":424,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"debops:master","ref":"master","sha":"e96f4696b4633aebeb463f47c7b47e104a221446","user":{"login":"debops","id":8523739,"avatar_url":"https://avatars.githubusercontent.com/u/8523739?v=3","gravatar_id":"","url":"https://api.github.com/users/debops","html_url":"https://github.com/debops","followers_url":"https://api.github.com/users/debops/followers","following_url":"https://api.github.com/users/debops/following{/other_user}","gists_url":"https://api.github.com/users/debops/gists{/gist_id}","starred_url":"https://api.github.com/users/debops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/debops/subscriptions","organizations_url":"https://api.github.com/users/debops/orgs","repos_url":"https://api.github.com/users/debops/repos","events_url":"https://api.github.com/users/debops/events{/privacy}","received_events_url":"https://api.github.com/users/debops/received_events","type":"Organization","site_admin":false},"repo":{"id":23552346,"name":"debops","full_name":"debops/debops","owner":{"login":"debops","id":8523739,"avatar_url":"https://avatars.githubusercontent.com/u/8523739?v=3","gravatar_id":"","url":"https://api.github.com/users/debops","html_url":"https://github.com/debops","followers_url":"https://api.github.com/users/debops/followers","following_url":"https://api.github.com/users/debops/following{/other_user}","gists_url":"https://api.github.com/users/debops/gists{/gist_id}","starred_url":"https://api.github.com/users/debops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/debops/subscriptions","organizations_url":"https://api.github.com/users/debops/orgs","repos_url":"https://api.github.com/users/debops/repos","events_url":"https://api.github.com/users/debops/events{/privacy}","received_events_url":"https://api.github.com/users/debops/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/debops/debops","description":"Your Debian-based data center in a box - ","fork":false,"url":"https://api.github.com/repos/debops/debops","forks_url":"https://api.github.com/repos/debops/debops/forks","keys_url":"https://api.github.com/repos/debops/debops/keys{/key_id}","collaborators_url":"https://api.github.com/repos/debops/debops/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/debops/debops/teams","hooks_url":"https://api.github.com/repos/debops/debops/hooks","issue_events_url":"https://api.github.com/repos/debops/debops/issues/events{/number}","events_url":"https://api.github.com/repos/debops/debops/events","assignees_url":"https://api.github.com/repos/debops/debops/assignees{/user}","branches_url":"https://api.github.com/repos/debops/debops/branches{/branch}","tags_url":"https://api.github.com/repos/debops/debops/tags","blobs_url":"https://api.github.com/repos/debops/debops/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/debops/debops/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/debops/debops/git/refs{/sha}","trees_url":"https://api.github.com/repos/debops/debops/git/trees{/sha}","statuses_url":"https://api.github.com/repos/debops/debops/statuses/{sha}","languages_url":"https://api.github.com/repos/debops/debops/languages","stargazers_url":"https://api.github.com/repos/debops/debops/stargazers","contributors_url":"https://api.github.com/repos/debops/debops/contributors","subscribers_url":"https://api.github.com/repos/debops/debops/subscribers","subscription_url":"https://api.github.com/repos/debops/debops/subscription","commits_url":"https://api.github.com/repos/debops/debops/commits{/sha}","git_commits_url":"https://api.github.com/repos/debops/debops/git/commits{/sha}","comments_url":"https://api.github.com/repos/debops/debops/comments{/number}","issue_comment_url":"https://api.github.com/repos/debops/debops/issues/comments/{number}","contents_url":"https://api.github.com/repos/debops/debops/contents/{+path}","compare_url":"https://api.github.com/repos/debops/debops/compare/{base}...{head}","merges_url":"https://api.github.com/repos/debops/debops/merges","archive_url":"https://api.github.com/repos/debops/debops/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/debops/debops/downloads","issues_url":"https://api.github.com/repos/debops/debops/issues{/number}","pulls_url":"https://api.github.com/repos/debops/debops/pulls{/number}","milestones_url":"https://api.github.com/repos/debops/debops/milestones{/number}","notifications_url":"https://api.github.com/repos/debops/debops/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/debops/debops/labels{/name}","releases_url":"https://api.github.com/repos/debops/debops/releases{/id}","created_at":"2014-09-01T18:47:36Z","updated_at":"2015-01-28T20:09:24Z","pushed_at":"2015-01-28T21:10:39Z","git_url":"git://github.com/debops/debops.git","ssh_url":"git@github.com:debops/debops.git","clone_url":"https://github.com/debops/debops.git","svn_url":"https://github.com/debops/debops","homepage":"http://debops.org/","size":955,"stargazers_count":90,"watchers_count":90,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":4,"forks":15,"open_issues":4,"watchers":90,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/debops/debops/pulls/90"},"html":{"href":"https://github.com/debops/debops/pull/90"},"issue":{"href":"https://api.github.com/repos/debops/debops/issues/90"},"comments":{"href":"https://api.github.com/repos/debops/debops/issues/90/comments"},"review_comments":{"href":"https://api.github.com/repos/debops/debops/pulls/90/comments"},"review_comment":{"href":"https://api.github.com/repos/debops/debops/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/debops/debops/pulls/90/commits"},"statuses":{"href":"https://api.github.com/repos/debops/debops/statuses/476e640b82b26112f20a45b2331a8bcff0def372"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"drybjed","id":1043958,"avatar_url":"https://avatars.githubusercontent.com/u/1043958?v=3","gravatar_id":"","url":"https://api.github.com/users/drybjed","html_url":"https://github.com/drybjed","followers_url":"https://api.github.com/users/drybjed/followers","following_url":"https://api.github.com/users/drybjed/following{/other_user}","gists_url":"https://api.github.com/users/drybjed/gists{/gist_id}","starred_url":"https://api.github.com/users/drybjed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drybjed/subscriptions","organizations_url":"https://api.github.com/users/drybjed/orgs","repos_url":"https://api.github.com/users/drybjed/repos","events_url":"https://api.github.com/users/drybjed/events{/privacy}","received_events_url":"https://api.github.com/users/drybjed/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":1,"additions":3,"deletions":11,"changed_files":1}}