{"action":"created","comment":{"url":"https://api.github.com/repos/thoughtbot/gitsh/pulls/comments/115096742","pull_request_review_id":36619621,"id":115096742,"diff_hunk":"@@ -77,6 +77,19 @@\n     end\n   end\n \n+  context '$_root' do\n+    it 'evaluates to the root path of the repository' do\n+      GitshRunner.interactive do |gitsh|\n+        root_dir = Dir.pwd\n+        gitsh.type('init')\n+        gitsh.type(':echo $_root')","path":"spec/integration/magic_variables_spec.rb","position":9,"original_position":9,"commit_id":"fb29f8d8c013038ca4837d4b2a66a4d1a73fd641","original_commit_id":"fb29f8d8c013038ca4837d4b2a66a4d1a73fd641","user":{"login":"mike-burns","id":4550,"avatar_url":"https://avatars0.githubusercontent.com/u/4550?v=3","gravatar_id":"","url":"https://api.github.com/users/mike-burns","html_url":"https://github.com/mike-burns","followers_url":"https://api.github.com/users/mike-burns/followers","following_url":"https://api.github.com/users/mike-burns/following{/other_user}","gists_url":"https://api.github.com/users/mike-burns/gists{/gist_id}","starred_url":"https://api.github.com/users/mike-burns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mike-burns/subscriptions","organizations_url":"https://api.github.com/users/mike-burns/orgs","repos_url":"https://api.github.com/users/mike-burns/repos","events_url":"https://api.github.com/users/mike-burns/events{/privacy}","received_events_url":"https://api.github.com/users/mike-burns/received_events","type":"User","site_admin":false},"body":"Given this setup, this is the same as the working directory. I'd love for this test to start gitsh from a directory where the parent dir has a`.git` instead.","created_at":"2017-05-05T22:12:07Z","updated_at":"2017-05-05T22:13:24Z","html_url":"https://github.com/thoughtbot/gitsh/pull/290#discussion_r115096742","pull_request_url":"https://api.github.com/repos/thoughtbot/gitsh/pulls/290","_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/gitsh/pulls/comments/115096742"},"html":{"href":"https://github.com/thoughtbot/gitsh/pull/290#discussion_r115096742"},"pull_request":{"href":"https://api.github.com/repos/thoughtbot/gitsh/pulls/290"}}},"pull_request":{"url":"https://api.github.com/repos/thoughtbot/gitsh/pulls/290","id":114960684,"html_url":"https://github.com/thoughtbot/gitsh/pull/290","diff_url":"https://github.com/thoughtbot/gitsh/pull/290.diff","patch_url":"https://github.com/thoughtbot/gitsh/pull/290.patch","issue_url":"https://api.github.com/repos/thoughtbot/gitsh/issues/290","number":290,"state":"open","locked":false,"title":"Repo root helpers","user":{"login":"georgebrock","id":35861,"avatar_url":"https://avatars2.githubusercontent.com/u/35861?v=3","gravatar_id":"","url":"https://api.github.com/users/georgebrock","html_url":"https://github.com/georgebrock","followers_url":"https://api.github.com/users/georgebrock/followers","following_url":"https://api.github.com/users/georgebrock/following{/other_user}","gists_url":"https://api.github.com/users/georgebrock/gists{/gist_id}","starred_url":"https://api.github.com/users/georgebrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgebrock/subscriptions","organizations_url":"https://api.github.com/users/georgebrock/orgs","repos_url":"https://api.github.com/users/georgebrock/repos","events_url":"https://api.github.com/users/georgebrock/events{/privacy}","received_events_url":"https://api.github.com/users/georgebrock/received_events","type":"User","site_admin":false},"body":"A couple of little helpers for finding a repository's root directory:\r\n\r\n- A `$_root` magic variable which evaluates to the repository's root.\r\n- An update to the `:cd` command, so that it changes to the repository root when invoked without a path. Thanks to @christoomey for suggesting this one in #242.","created_at":"2017-04-08T20:49:49Z","updated_at":"2017-05-05T22:13:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"22d3e5565a95556e1b44b6d5e486ea01ff1f3275","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/thoughtbot/gitsh/pulls/290/commits","review_comments_url":"https://api.github.com/repos/thoughtbot/gitsh/pulls/290/comments","review_comment_url":"https://api.github.com/repos/thoughtbot/gitsh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thoughtbot/gitsh/issues/290/comments","statuses_url":"https://api.github.com/repos/thoughtbot/gitsh/statuses/fb29f8d8c013038ca4837d4b2a66a4d1a73fd641","head":{"label":"thoughtbot:root-dir","ref":"root-dir","sha":"fb29f8d8c013038ca4837d4b2a66a4d1a73fd641","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars0.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":14063942,"name":"gitsh","full_name":"thoughtbot/gitsh","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars0.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/gitsh","description":"An interactive shell for git","fork":false,"url":"https://api.github.com/repos/thoughtbot/gitsh","forks_url":"https://api.github.com/repos/thoughtbot/gitsh/forks","keys_url":"https://api.github.com/repos/thoughtbot/gitsh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/gitsh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/gitsh/teams","hooks_url":"https://api.github.com/repos/thoughtbot/gitsh/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/gitsh/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/gitsh/events","assignees_url":"https://api.github.com/repos/thoughtbot/gitsh/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/gitsh/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/gitsh/tags","blobs_url":"https://api.github.com/repos/thoughtbot/gitsh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/gitsh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/gitsh/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/gitsh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/gitsh/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/gitsh/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/gitsh/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/gitsh/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/gitsh/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/gitsh/subscription","commits_url":"https://api.github.com/repos/thoughtbot/gitsh/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/gitsh/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/gitsh/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/gitsh/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtbot/gitsh/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/gitsh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/gitsh/merges","archive_url":"https://api.github.com/repos/thoughtbot/gitsh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/gitsh/downloads","issues_url":"https://api.github.com/repos/thoughtbot/gitsh/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/gitsh/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/gitsh/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/gitsh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/gitsh/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/gitsh/releases{/id}","deployments_url":"https://api.github.com/repos/thoughtbot/gitsh/deployments","created_at":"2013-11-02T09:33:38Z","updated_at":"2017-05-05T13:53:02Z","pushed_at":"2017-05-05T18:26:43Z","git_url":"git://github.com/thoughtbot/gitsh.git","ssh_url":"git@github.com:thoughtbot/gitsh.git","clone_url":"https://github.com/thoughtbot/gitsh.git","svn_url":"https://github.com/thoughtbot/gitsh","homepage":"https://thoughtbot.com/tools","size":2534,"stargazers_count":1678,"watchers_count":1678,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":91,"mirror_url":null,"open_issues_count":21,"forks":91,"open_issues":21,"watchers":1678,"default_branch":"master"}},"base":{"label":"thoughtbot:master","ref":"master","sha":"24a2287089f288bd07c193cfe9c8ce796fe4c7da","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars0.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":14063942,"name":"gitsh","full_name":"thoughtbot/gitsh","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars0.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/gitsh","description":"An interactive shell for git","fork":false,"url":"https://api.github.com/repos/thoughtbot/gitsh","forks_url":"https://api.github.com/repos/thoughtbot/gitsh/forks","keys_url":"https://api.github.com/repos/thoughtbot/gitsh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/gitsh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/gitsh/teams","hooks_url":"https://api.github.com/repos/thoughtbot/gitsh/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/gitsh/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/gitsh/events","assignees_url":"https://api.github.com/repos/thoughtbot/gitsh/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/gitsh/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/gitsh/tags","blobs_url":"https://api.github.com/repos/thoughtbot/gitsh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/gitsh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/gitsh/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/gitsh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/gitsh/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/gitsh/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/gitsh/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/gitsh/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/gitsh/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/gitsh/subscription","commits_url":"https://api.github.com/repos/thoughtbot/gitsh/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/gitsh/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/gitsh/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/gitsh/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtbot/gitsh/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/gitsh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/gitsh/merges","archive_url":"https://api.github.com/repos/thoughtbot/gitsh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/gitsh/downloads","issues_url":"https://api.github.com/repos/thoughtbot/gitsh/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/gitsh/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/gitsh/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/gitsh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/gitsh/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/gitsh/releases{/id}","deployments_url":"https://api.github.com/repos/thoughtbot/gitsh/deployments","created_at":"2013-11-02T09:33:38Z","updated_at":"2017-05-05T13:53:02Z","pushed_at":"2017-05-05T18:26:43Z","git_url":"git://github.com/thoughtbot/gitsh.git","ssh_url":"git@github.com:thoughtbot/gitsh.git","clone_url":"https://github.com/thoughtbot/gitsh.git","svn_url":"https://github.com/thoughtbot/gitsh","homepage":"https://thoughtbot.com/tools","size":2534,"stargazers_count":1678,"watchers_count":1678,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":91,"mirror_url":null,"open_issues_count":21,"forks":91,"open_issues":21,"watchers":1678,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/gitsh/pulls/290"},"html":{"href":"https://github.com/thoughtbot/gitsh/pull/290"},"issue":{"href":"https://api.github.com/repos/thoughtbot/gitsh/issues/290"},"comments":{"href":"https://api.github.com/repos/thoughtbot/gitsh/issues/290/comments"},"review_comments":{"href":"https://api.github.com/repos/thoughtbot/gitsh/pulls/290/comments"},"review_comment":{"href":"https://api.github.com/repos/thoughtbot/gitsh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thoughtbot/gitsh/pulls/290/commits"},"statuses":{"href":"https://api.github.com/repos/thoughtbot/gitsh/statuses/fb29f8d8c013038ca4837d4b2a66a4d1a73fd641"}}}}
{"actor":{"display_login":"mike-burns"}}