{"action":"created","comment":{"url":"https://api.github.com/repos/jonas/tig/pulls/comments/66381841","id":66381841,"diff_hunk":"@@ -199,6 +199,71 @@ status_restore(struct view *view)\n \tclear_position(&view->prev_pos);\n }\n \n+static bool\n+status_branch_tracking_info(char *buf, size_t buf_len, const char *head,\n+\t\t\t    const char *remote)\n+{\n+\tif (!string_nformat(buf, buf_len, NULL, \"%s...%s\",\n+\t\t\t    head, remote)) {\n+\t\treturn false;\n+\t}\n+\n+\tconst char *tracking_info_argv[] = {\n+\t\t\"git\", \"rev-list\", \"--left-right\", buf, NULL\n+\t};","path":"src/status.c","position":15,"original_position":15,"commit_id":"53b2bba26ebe461fa7f79221c38b8ce33c9b745d","original_commit_id":"53b2bba26ebe461fa7f79221c38b8ce33c9b745d","user":{"login":"peff","id":45925,"avatar_url":"https://avatars.githubusercontent.com/u/45925?v=3","gravatar_id":"","url":"https://api.github.com/users/peff","html_url":"https://github.com/peff","followers_url":"https://api.github.com/users/peff/followers","following_url":"https://api.github.com/users/peff/following{/other_user}","gists_url":"https://api.github.com/users/peff/gists{/gist_id}","starred_url":"https://api.github.com/users/peff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peff/subscriptions","organizations_url":"https://api.github.com/users/peff/orgs","repos_url":"https://api.github.com/users/peff/repos","events_url":"https://api.github.com/users/peff/events{/privacy}","received_events_url":"https://api.github.com/users/peff/received_events","type":"User","site_admin":true},"body":"Sorry I'm a little late to the party, but I happened to notice this while pulling master. You can actually do `git rev-list --left-right --count` to get just the two counts. Probably not a big deal, but it would save a little pipe and parsing overhead.","created_at":"2016-06-09T04:43:28Z","updated_at":"2016-06-09T04:43:28Z","html_url":"https://github.com/jonas/tig/pull/504#discussion_r66381841","pull_request_url":"https://api.github.com/repos/jonas/tig/pulls/504","_links":{"self":{"href":"https://api.github.com/repos/jonas/tig/pulls/comments/66381841"},"html":{"href":"https://github.com/jonas/tig/pull/504#discussion_r66381841"},"pull_request":{"href":"https://api.github.com/repos/jonas/tig/pulls/504"}}},"pull_request":{"url":"https://api.github.com/repos/jonas/tig/pulls/504","id":72640097,"html_url":"https://github.com/jonas/tig/pull/504","diff_url":"https://github.com/jonas/tig/pull/504.diff","patch_url":"https://github.com/jonas/tig/pull/504.patch","issue_url":"https://api.github.com/repos/jonas/tig/issues/504","number":504,"state":"closed","locked":false,"title":"Show tracking info in tig status","user":{"login":"rgburke","id":7596018,"avatar_url":"https://avatars.githubusercontent.com/u/7596018?v=3","gravatar_id":"","url":"https://api.github.com/users/rgburke","html_url":"https://github.com/rgburke","followers_url":"https://api.github.com/users/rgburke/followers","following_url":"https://api.github.com/users/rgburke/following{/other_user}","gists_url":"https://api.github.com/users/rgburke/gists{/gist_id}","starred_url":"https://api.github.com/users/rgburke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgburke/subscriptions","organizations_url":"https://api.github.com/users/rgburke/orgs","repos_url":"https://api.github.com/users/rgburke/repos","events_url":"https://api.github.com/users/rgburke/events{/privacy}","received_events_url":"https://api.github.com/users/rgburke/received_events","type":"User","site_admin":false},"body":"- Updated `tig status` to show tracking info when appropriate as suggested in #460.\r\n- The `git rev-list` command is used to determine the difference with the remote branch instead of parsing the output of `git status`, as there's no guarantee the format of the latter will remain the same in future.\r\n- Added new test `on-branch-tracking-info-test` based on `on-branch-test` to help ensure this new functionality works as expected.\r\n\r\nBelow is a screenshot showing the appearance of this feature:\r\n\r\n![tig-branch-tracking-info](https://cloud.githubusercontent.com/assets/7596018/15808096/7c334a14-2b66-11e6-872e-21508801c852.PNG)","created_at":"2016-06-05T20:52:01Z","updated_at":"2016-06-09T04:43:28Z","closed_at":"2016-06-08T00:39:25Z","merged_at":"2016-06-08T00:39:25Z","merge_commit_sha":"68b7868eaf24590688cd5322a569947d9579492a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jonas/tig/pulls/504/commits","review_comments_url":"https://api.github.com/repos/jonas/tig/pulls/504/comments","review_comment_url":"https://api.github.com/repos/jonas/tig/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jonas/tig/issues/504/comments","statuses_url":"https://api.github.com/repos/jonas/tig/statuses/53b2bba26ebe461fa7f79221c38b8ce33c9b745d","head":{"label":"rgburke:status-tracking-info","ref":"status-tracking-info","sha":"53b2bba26ebe461fa7f79221c38b8ce33c9b745d","user":{"login":"rgburke","id":7596018,"avatar_url":"https://avatars.githubusercontent.com/u/7596018?v=3","gravatar_id":"","url":"https://api.github.com/users/rgburke","html_url":"https://github.com/rgburke","followers_url":"https://api.github.com/users/rgburke/followers","following_url":"https://api.github.com/users/rgburke/following{/other_user}","gists_url":"https://api.github.com/users/rgburke/gists{/gist_id}","starred_url":"https://api.github.com/users/rgburke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgburke/subscriptions","organizations_url":"https://api.github.com/users/rgburke/orgs","repos_url":"https://api.github.com/users/rgburke/repos","events_url":"https://api.github.com/users/rgburke/events{/privacy}","received_events_url":"https://api.github.com/users/rgburke/received_events","type":"User","site_admin":false},"repo":{"id":60124691,"name":"tig","full_name":"rgburke/tig","owner":{"login":"rgburke","id":7596018,"avatar_url":"https://avatars.githubusercontent.com/u/7596018?v=3","gravatar_id":"","url":"https://api.github.com/users/rgburke","html_url":"https://github.com/rgburke","followers_url":"https://api.github.com/users/rgburke/followers","following_url":"https://api.github.com/users/rgburke/following{/other_user}","gists_url":"https://api.github.com/users/rgburke/gists{/gist_id}","starred_url":"https://api.github.com/users/rgburke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgburke/subscriptions","organizations_url":"https://api.github.com/users/rgburke/orgs","repos_url":"https://api.github.com/users/rgburke/repos","events_url":"https://api.github.com/users/rgburke/events{/privacy}","received_events_url":"https://api.github.com/users/rgburke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rgburke/tig","description":"Text-mode interface for git","fork":true,"url":"https://api.github.com/repos/rgburke/tig","forks_url":"https://api.github.com/repos/rgburke/tig/forks","keys_url":"https://api.github.com/repos/rgburke/tig/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rgburke/tig/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rgburke/tig/teams","hooks_url":"https://api.github.com/repos/rgburke/tig/hooks","issue_events_url":"https://api.github.com/repos/rgburke/tig/issues/events{/number}","events_url":"https://api.github.com/repos/rgburke/tig/events","assignees_url":"https://api.github.com/repos/rgburke/tig/assignees{/user}","branches_url":"https://api.github.com/repos/rgburke/tig/branches{/branch}","tags_url":"https://api.github.com/repos/rgburke/tig/tags","blobs_url":"https://api.github.com/repos/rgburke/tig/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rgburke/tig/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rgburke/tig/git/refs{/sha}","trees_url":"https://api.github.com/repos/rgburke/tig/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rgburke/tig/statuses/{sha}","languages_url":"https://api.github.com/repos/rgburke/tig/languages","stargazers_url":"https://api.github.com/repos/rgburke/tig/stargazers","contributors_url":"https://api.github.com/repos/rgburke/tig/contributors","subscribers_url":"https://api.github.com/repos/rgburke/tig/subscribers","subscription_url":"https://api.github.com/repos/rgburke/tig/subscription","commits_url":"https://api.github.com/repos/rgburke/tig/commits{/sha}","git_commits_url":"https://api.github.com/repos/rgburke/tig/git/commits{/sha}","comments_url":"https://api.github.com/repos/rgburke/tig/comments{/number}","issue_comment_url":"https://api.github.com/repos/rgburke/tig/issues/comments{/number}","contents_url":"https://api.github.com/repos/rgburke/tig/contents/{+path}","compare_url":"https://api.github.com/repos/rgburke/tig/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rgburke/tig/merges","archive_url":"https://api.github.com/repos/rgburke/tig/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rgburke/tig/downloads","issues_url":"https://api.github.com/repos/rgburke/tig/issues{/number}","pulls_url":"https://api.github.com/repos/rgburke/tig/pulls{/number}","milestones_url":"https://api.github.com/repos/rgburke/tig/milestones{/number}","notifications_url":"https://api.github.com/repos/rgburke/tig/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rgburke/tig/labels{/name}","releases_url":"https://api.github.com/repos/rgburke/tig/releases{/id}","deployments_url":"https://api.github.com/repos/rgburke/tig/deployments","created_at":"2016-05-31T21:28:19Z","updated_at":"2016-05-31T21:28:20Z","pushed_at":"2016-06-07T21:38:25Z","git_url":"git://github.com/rgburke/tig.git","ssh_url":"git@github.com:rgburke/tig.git","clone_url":"https://github.com/rgburke/tig.git","svn_url":"https://github.com/rgburke/tig","homepage":"http://jonas.nitro.dk/tig/","size":5045,"stargazers_count":0,"watchers_count":0,"language":"C","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":"jonas:master","ref":"master","sha":"ebd8a238266cdebb970ec8d77a3382963d437e09","user":{"login":"jonas","id":8417,"avatar_url":"https://avatars.githubusercontent.com/u/8417?v=3","gravatar_id":"","url":"https://api.github.com/users/jonas","html_url":"https://github.com/jonas","followers_url":"https://api.github.com/users/jonas/followers","following_url":"https://api.github.com/users/jonas/following{/other_user}","gists_url":"https://api.github.com/users/jonas/gists{/gist_id}","starred_url":"https://api.github.com/users/jonas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonas/subscriptions","organizations_url":"https://api.github.com/users/jonas/orgs","repos_url":"https://api.github.com/users/jonas/repos","events_url":"https://api.github.com/users/jonas/events{/privacy}","received_events_url":"https://api.github.com/users/jonas/received_events","type":"User","site_admin":false},"repo":{"id":140656,"name":"tig","full_name":"jonas/tig","owner":{"login":"jonas","id":8417,"avatar_url":"https://avatars.githubusercontent.com/u/8417?v=3","gravatar_id":"","url":"https://api.github.com/users/jonas","html_url":"https://github.com/jonas","followers_url":"https://api.github.com/users/jonas/followers","following_url":"https://api.github.com/users/jonas/following{/other_user}","gists_url":"https://api.github.com/users/jonas/gists{/gist_id}","starred_url":"https://api.github.com/users/jonas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonas/subscriptions","organizations_url":"https://api.github.com/users/jonas/orgs","repos_url":"https://api.github.com/users/jonas/repos","events_url":"https://api.github.com/users/jonas/events{/privacy}","received_events_url":"https://api.github.com/users/jonas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonas/tig","description":"Text-mode interface for git","fork":false,"url":"https://api.github.com/repos/jonas/tig","forks_url":"https://api.github.com/repos/jonas/tig/forks","keys_url":"https://api.github.com/repos/jonas/tig/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonas/tig/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonas/tig/teams","hooks_url":"https://api.github.com/repos/jonas/tig/hooks","issue_events_url":"https://api.github.com/repos/jonas/tig/issues/events{/number}","events_url":"https://api.github.com/repos/jonas/tig/events","assignees_url":"https://api.github.com/repos/jonas/tig/assignees{/user}","branches_url":"https://api.github.com/repos/jonas/tig/branches{/branch}","tags_url":"https://api.github.com/repos/jonas/tig/tags","blobs_url":"https://api.github.com/repos/jonas/tig/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonas/tig/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonas/tig/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonas/tig/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonas/tig/statuses/{sha}","languages_url":"https://api.github.com/repos/jonas/tig/languages","stargazers_url":"https://api.github.com/repos/jonas/tig/stargazers","contributors_url":"https://api.github.com/repos/jonas/tig/contributors","subscribers_url":"https://api.github.com/repos/jonas/tig/subscribers","subscription_url":"https://api.github.com/repos/jonas/tig/subscription","commits_url":"https://api.github.com/repos/jonas/tig/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonas/tig/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonas/tig/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonas/tig/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonas/tig/contents/{+path}","compare_url":"https://api.github.com/repos/jonas/tig/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonas/tig/merges","archive_url":"https://api.github.com/repos/jonas/tig/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonas/tig/downloads","issues_url":"https://api.github.com/repos/jonas/tig/issues{/number}","pulls_url":"https://api.github.com/repos/jonas/tig/pulls{/number}","milestones_url":"https://api.github.com/repos/jonas/tig/milestones{/number}","notifications_url":"https://api.github.com/repos/jonas/tig/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonas/tig/labels{/name}","releases_url":"https://api.github.com/repos/jonas/tig/releases{/id}","deployments_url":"https://api.github.com/repos/jonas/tig/deployments","created_at":"2009-03-01T20:39:25Z","updated_at":"2016-06-08T07:28:49Z","pushed_at":"2016-06-08T00:39:25Z","git_url":"git://github.com/jonas/tig.git","ssh_url":"git@github.com:jonas/tig.git","clone_url":"https://github.com/jonas/tig.git","svn_url":"https://github.com/jonas/tig","homepage":"http://jonas.nitro.dk/tig/","size":6698,"stargazers_count":3183,"watchers_count":3183,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":233,"mirror_url":null,"open_issues_count":94,"forks":233,"open_issues":94,"watchers":3183,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jonas/tig/pulls/504"},"html":{"href":"https://github.com/jonas/tig/pull/504"},"issue":{"href":"https://api.github.com/repos/jonas/tig/issues/504"},"comments":{"href":"https://api.github.com/repos/jonas/tig/issues/504/comments"},"review_comments":{"href":"https://api.github.com/repos/jonas/tig/pulls/504/comments"},"review_comment":{"href":"https://api.github.com/repos/jonas/tig/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jonas/tig/pulls/504/commits"},"statuses":{"href":"https://api.github.com/repos/jonas/tig/statuses/53b2bba26ebe461fa7f79221c38b8ce33c9b745d"}}}}
{"actor":{"display_login":"peff"}}