{"action":"created","comment":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/comments/73803042","id":73803042,"diff_hunk":"@@ -1,3 +1,4 @@\n #!/bin/bash\n+\n pwd=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)\"","path":"Library/Homebrew/shims/super/mig","position":3,"original_position":3,"commit_id":"b516feed9c6b3d058d425cbd273b6ab5a33a93b9","original_commit_id":"b516feed9c6b3d058d425cbd273b6ab5a33a93b9","user":{"login":"xu-cheng","id":3105373,"avatar_url":"https://avatars.githubusercontent.com/u/3105373?v=3","gravatar_id":"","url":"https://api.github.com/users/xu-cheng","html_url":"https://github.com/xu-cheng","followers_url":"https://api.github.com/users/xu-cheng/followers","following_url":"https://api.github.com/users/xu-cheng/following{/other_user}","gists_url":"https://api.github.com/users/xu-cheng/gists{/gist_id}","starred_url":"https://api.github.com/users/xu-cheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xu-cheng/subscriptions","organizations_url":"https://api.github.com/users/xu-cheng/orgs","repos_url":"https://api.github.com/users/xu-cheng/repos","events_url":"https://api.github.com/users/xu-cheng/events{/privacy}","received_events_url":"https://api.github.com/users/xu-cheng/received_events","type":"User","site_admin":false},"body":"It seems that there are multiple styles for resolving the current directory. I'm wondering should we make them consistence as well?","created_at":"2016-08-07T14:40:58Z","updated_at":"2016-08-07T14:40:58Z","html_url":"https://github.com/Homebrew/brew/pull/654#discussion_r73803042","pull_request_url":"https://api.github.com/repos/Homebrew/brew/pulls/654","_links":{"self":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/comments/73803042"},"html":{"href":"https://github.com/Homebrew/brew/pull/654#discussion_r73803042"},"pull_request":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/654"}}},"pull_request":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/654","id":80366759,"html_url":"https://github.com/Homebrew/brew/pull/654","diff_url":"https://github.com/Homebrew/brew/pull/654.diff","patch_url":"https://github.com/Homebrew/brew/pull/654.patch","issue_url":"https://api.github.com/repos/Homebrew/brew/issues/654","number":654,"state":"open","locked":false,"title":"Fix style inconsistencies in Bash code","user":{"login":"UniqMartin","id":11892150,"avatar_url":"https://avatars.githubusercontent.com/u/11892150?v=3","gravatar_id":"","url":"https://api.github.com/users/UniqMartin","html_url":"https://github.com/UniqMartin","followers_url":"https://api.github.com/users/UniqMartin/followers","following_url":"https://api.github.com/users/UniqMartin/following{/other_user}","gists_url":"https://api.github.com/users/UniqMartin/gists{/gist_id}","starred_url":"https://api.github.com/users/UniqMartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UniqMartin/subscriptions","organizations_url":"https://api.github.com/users/UniqMartin/orgs","repos_url":"https://api.github.com/users/UniqMartin/repos","events_url":"https://api.github.com/users/UniqMartin/events{/privacy}","received_events_url":"https://api.github.com/users/UniqMartin/received_events","type":"User","site_admin":false},"body":"- [x] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/brew/blob/master/.github/CONTRIBUTING.md) document?\r\n- [x] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/Homebrew/brew/pulls) for the same change?\r\n- [x] Have you added an explanation of what your changes do and why you'd like us to include them?\r\n- [ ] Have you written new tests for your changes?\r\n- [x] Have you successfully run `brew tests` with your changes locally?\r\n\r\n-----\r\n\r\nWe have accumulated quite a few style inconsistencies in our Bash code. I fixed all of them following the rules below that I inferred them from what I believe to be our preferred and/or predominant style. (Of course all of those rules are up for debate.)\r\n\r\n- **Whitespace**\r\n\r\n  - Indent by two spaces.\r\n  - Align single-line items in `case` statements.\r\n  - Put one space between single-line items in `case` and terminating `;;`.\r\n  - Indent items in `case` statements one step (unlike in Ruby code).\r\n  - Use multi-line `if`/`elsif`-`then` and `for`/`while`-`do` statements.\r\n  - Omit space between function name and `()`.\r\n  - Put function “signature” and opening curly brace on same line, e.g. `foo() {`.\r\n  - Put a newline between shebang and shell code.\r\n  - Omit space after redirection operators (`>`, `>>`, `<`), e.g. `>/dev/null`.\r\n\r\n- **Redundant Stuff**\r\n\r\n  - Omit unneeded trailing `;`.\r\n  - Omit unneeded `-` in `<<-EOS` (we don't tab-indent our here documents).\r\n  - Omit unneeded line continuation (`\\`) in arrays.\r\n\r\n\r\n- **Miscellaneous**\r\n\r\n  - Prefer double-quoted strings over single-quoted strings if equally clear. (Continue to use single-quoted string if double-quoted string requires heinous escaping.)\r\n  - Prefer `[[` over `[` and `test`.\r\n  - Prefer `=` over `==` in `[[`.\r\n  - Always quote variable usage and shell substitution unless word-splitting behavior is intended. (For consistency, do this also in assignments where special rules apply.)","created_at":"2016-08-07T13:14:53Z","updated_at":"2016-08-07T14:40:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75721877211a26bdd786f4e6e7635188acf25668","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Homebrew/brew/pulls/654/commits","review_comments_url":"https://api.github.com/repos/Homebrew/brew/pulls/654/comments","review_comment_url":"https://api.github.com/repos/Homebrew/brew/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Homebrew/brew/issues/654/comments","statuses_url":"https://api.github.com/repos/Homebrew/brew/statuses/b516feed9c6b3d058d425cbd273b6ab5a33a93b9","head":{"label":"UniqMartin:shell-style","ref":"shell-style","sha":"b516feed9c6b3d058d425cbd273b6ab5a33a93b9","user":{"login":"UniqMartin","id":11892150,"avatar_url":"https://avatars.githubusercontent.com/u/11892150?v=3","gravatar_id":"","url":"https://api.github.com/users/UniqMartin","html_url":"https://github.com/UniqMartin","followers_url":"https://api.github.com/users/UniqMartin/followers","following_url":"https://api.github.com/users/UniqMartin/following{/other_user}","gists_url":"https://api.github.com/users/UniqMartin/gists{/gist_id}","starred_url":"https://api.github.com/users/UniqMartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UniqMartin/subscriptions","organizations_url":"https://api.github.com/users/UniqMartin/orgs","repos_url":"https://api.github.com/users/UniqMartin/repos","events_url":"https://api.github.com/users/UniqMartin/events{/privacy}","received_events_url":"https://api.github.com/users/UniqMartin/received_events","type":"User","site_admin":false},"repo":{"id":55350360,"name":"brew","full_name":"UniqMartin/brew","owner":{"login":"UniqMartin","id":11892150,"avatar_url":"https://avatars.githubusercontent.com/u/11892150?v=3","gravatar_id":"","url":"https://api.github.com/users/UniqMartin","html_url":"https://github.com/UniqMartin","followers_url":"https://api.github.com/users/UniqMartin/followers","following_url":"https://api.github.com/users/UniqMartin/following{/other_user}","gists_url":"https://api.github.com/users/UniqMartin/gists{/gist_id}","starred_url":"https://api.github.com/users/UniqMartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UniqMartin/subscriptions","organizations_url":"https://api.github.com/users/UniqMartin/orgs","repos_url":"https://api.github.com/users/UniqMartin/repos","events_url":"https://api.github.com/users/UniqMartin/events{/privacy}","received_events_url":"https://api.github.com/users/UniqMartin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/UniqMartin/brew","description":":beer: Fork of “The missing package manager for OS X”","fork":true,"url":"https://api.github.com/repos/UniqMartin/brew","forks_url":"https://api.github.com/repos/UniqMartin/brew/forks","keys_url":"https://api.github.com/repos/UniqMartin/brew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UniqMartin/brew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UniqMartin/brew/teams","hooks_url":"https://api.github.com/repos/UniqMartin/brew/hooks","issue_events_url":"https://api.github.com/repos/UniqMartin/brew/issues/events{/number}","events_url":"https://api.github.com/repos/UniqMartin/brew/events","assignees_url":"https://api.github.com/repos/UniqMartin/brew/assignees{/user}","branches_url":"https://api.github.com/repos/UniqMartin/brew/branches{/branch}","tags_url":"https://api.github.com/repos/UniqMartin/brew/tags","blobs_url":"https://api.github.com/repos/UniqMartin/brew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UniqMartin/brew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UniqMartin/brew/git/refs{/sha}","trees_url":"https://api.github.com/repos/UniqMartin/brew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UniqMartin/brew/statuses/{sha}","languages_url":"https://api.github.com/repos/UniqMartin/brew/languages","stargazers_url":"https://api.github.com/repos/UniqMartin/brew/stargazers","contributors_url":"https://api.github.com/repos/UniqMartin/brew/contributors","subscribers_url":"https://api.github.com/repos/UniqMartin/brew/subscribers","subscription_url":"https://api.github.com/repos/UniqMartin/brew/subscription","commits_url":"https://api.github.com/repos/UniqMartin/brew/commits{/sha}","git_commits_url":"https://api.github.com/repos/UniqMartin/brew/git/commits{/sha}","comments_url":"https://api.github.com/repos/UniqMartin/brew/comments{/number}","issue_comment_url":"https://api.github.com/repos/UniqMartin/brew/issues/comments{/number}","contents_url":"https://api.github.com/repos/UniqMartin/brew/contents/{+path}","compare_url":"https://api.github.com/repos/UniqMartin/brew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UniqMartin/brew/merges","archive_url":"https://api.github.com/repos/UniqMartin/brew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UniqMartin/brew/downloads","issues_url":"https://api.github.com/repos/UniqMartin/brew/issues{/number}","pulls_url":"https://api.github.com/repos/UniqMartin/brew/pulls{/number}","milestones_url":"https://api.github.com/repos/UniqMartin/brew/milestones{/number}","notifications_url":"https://api.github.com/repos/UniqMartin/brew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UniqMartin/brew/labels{/name}","releases_url":"https://api.github.com/repos/UniqMartin/brew/releases{/id}","deployments_url":"https://api.github.com/repos/UniqMartin/brew/deployments","created_at":"2016-04-03T14:28:58Z","updated_at":"2016-05-25T00:45:16Z","pushed_at":"2016-08-07T12:44:48Z","git_url":"git://github.com/UniqMartin/brew.git","ssh_url":"git@github.com:UniqMartin/brew.git","clone_url":"https://github.com/UniqMartin/brew.git","svn_url":"https://github.com/UniqMartin/brew","homepage":"","size":10448,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Homebrew:master","ref":"master","sha":"b8ce1fe1b2abfc6b38a6c6451ef8074f2a83a8eb","user":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"repo":{"id":53238813,"name":"brew","full_name":"Homebrew/brew","owner":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Homebrew/brew","description":":beer: The missing package manager for OS X","fork":false,"url":"https://api.github.com/repos/Homebrew/brew","forks_url":"https://api.github.com/repos/Homebrew/brew/forks","keys_url":"https://api.github.com/repos/Homebrew/brew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Homebrew/brew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Homebrew/brew/teams","hooks_url":"https://api.github.com/repos/Homebrew/brew/hooks","issue_events_url":"https://api.github.com/repos/Homebrew/brew/issues/events{/number}","events_url":"https://api.github.com/repos/Homebrew/brew/events","assignees_url":"https://api.github.com/repos/Homebrew/brew/assignees{/user}","branches_url":"https://api.github.com/repos/Homebrew/brew/branches{/branch}","tags_url":"https://api.github.com/repos/Homebrew/brew/tags","blobs_url":"https://api.github.com/repos/Homebrew/brew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Homebrew/brew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Homebrew/brew/git/refs{/sha}","trees_url":"https://api.github.com/repos/Homebrew/brew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Homebrew/brew/statuses/{sha}","languages_url":"https://api.github.com/repos/Homebrew/brew/languages","stargazers_url":"https://api.github.com/repos/Homebrew/brew/stargazers","contributors_url":"https://api.github.com/repos/Homebrew/brew/contributors","subscribers_url":"https://api.github.com/repos/Homebrew/brew/subscribers","subscription_url":"https://api.github.com/repos/Homebrew/brew/subscription","commits_url":"https://api.github.com/repos/Homebrew/brew/commits{/sha}","git_commits_url":"https://api.github.com/repos/Homebrew/brew/git/commits{/sha}","comments_url":"https://api.github.com/repos/Homebrew/brew/comments{/number}","issue_comment_url":"https://api.github.com/repos/Homebrew/brew/issues/comments{/number}","contents_url":"https://api.github.com/repos/Homebrew/brew/contents/{+path}","compare_url":"https://api.github.com/repos/Homebrew/brew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Homebrew/brew/merges","archive_url":"https://api.github.com/repos/Homebrew/brew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Homebrew/brew/downloads","issues_url":"https://api.github.com/repos/Homebrew/brew/issues{/number}","pulls_url":"https://api.github.com/repos/Homebrew/brew/pulls{/number}","milestones_url":"https://api.github.com/repos/Homebrew/brew/milestones{/number}","notifications_url":"https://api.github.com/repos/Homebrew/brew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Homebrew/brew/labels{/name}","releases_url":"https://api.github.com/repos/Homebrew/brew/releases{/id}","deployments_url":"https://api.github.com/repos/Homebrew/brew/deployments","created_at":"2016-03-06T05:08:38Z","updated_at":"2016-08-07T13:07:47Z","pushed_at":"2016-08-07T13:14:53Z","git_url":"git://github.com/Homebrew/brew.git","ssh_url":"git@github.com:Homebrew/brew.git","clone_url":"https://github.com/Homebrew/brew.git","svn_url":"https://github.com/Homebrew/brew","homepage":"http://brew.sh","size":11105,"stargazers_count":2429,"watchers_count":2429,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":697,"mirror_url":null,"open_issues_count":68,"forks":697,"open_issues":68,"watchers":2429,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/654"},"html":{"href":"https://github.com/Homebrew/brew/pull/654"},"issue":{"href":"https://api.github.com/repos/Homebrew/brew/issues/654"},"comments":{"href":"https://api.github.com/repos/Homebrew/brew/issues/654/comments"},"review_comments":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/654/comments"},"review_comment":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/654/commits"},"statuses":{"href":"https://api.github.com/repos/Homebrew/brew/statuses/b516feed9c6b3d058d425cbd273b6ab5a33a93b9"}}}}
{"actor":{"display_login":"xu-cheng"}}