{"action":"created","comment":{"url":"https://api.github.com/repos/sourcegraph/go-vcs/pulls/comments/44218678","id":44218678,"diff_hunk":"@@ -23,5 +23,31 @@ type HTTPSConfig struct {\n type RemoteUpdater interface {\n \t// UpdateEverything updates all branches, tags, etc., to match the\n \t// default remote repository. The implementation is VCS-dependent.\n-\tUpdateEverything(RemoteOpts) error\n+\t// If supported by the implementation, results of update will be returned.\n+\tUpdateEverything(RemoteOpts) (UpdateResult, error)\n+}\n+\n+// UpdateResult is the result of parsing output of the remote update operation.\n+type UpdateResult struct {\n+\tChanges []Change\n+}\n+\n+// Operation that happened to a branch.\n+type Operation uint8\n+\n+const (\n+\t// New is a branch that was created.\n+\tNew Operation = iota\n+\n+\t// Updated is a branch that was updated.\n+\tUpdated\n+\n+\t// Deleted is a branch that was deleted.\n+\tDeleted","path":"vcs/remote.go","position":25,"original_position":25,"commit_id":"a6a26f990c32241b5a6e401aa4ea17b85a3a4063","original_commit_id":"a6a26f990c32241b5a6e401aa4ea17b85a3a4063","user":{"login":"shurcooL","id":1924134,"avatar_url":"https://avatars.githubusercontent.com/u/1924134?v=3","gravatar_id":"","url":"https://api.github.com/users/shurcooL","html_url":"https://github.com/shurcooL","followers_url":"https://api.github.com/users/shurcooL/followers","following_url":"https://api.github.com/users/shurcooL/following{/other_user}","gists_url":"https://api.github.com/users/shurcooL/gists{/gist_id}","starred_url":"https://api.github.com/users/shurcooL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shurcooL/subscriptions","organizations_url":"https://api.github.com/users/shurcooL/orgs","repos_url":"https://api.github.com/users/shurcooL/repos","events_url":"https://api.github.com/users/shurcooL/events{/privacy}","received_events_url":"https://api.github.com/users/shurcooL/received_events","type":"User","site_admin":false},"body":"These names are nice and don't conflict now, but I'm concerned that using up an exported identifier like `New` for an update result operation name might be problematic in the future if a func `New` is desired to be added.\r\n\r\nPerhaps adding an `Op` suffix to these would alleviate that potential problem.","created_at":"2015-11-07T23:36:33Z","updated_at":"2015-11-07T23:36:33Z","html_url":"https://github.com/sourcegraph/go-vcs/pull/80#discussion_r44218678","pull_request_url":"https://api.github.com/repos/sourcegraph/go-vcs/pulls/80","_links":{"self":{"href":"https://api.github.com/repos/sourcegraph/go-vcs/pulls/comments/44218678"},"html":{"href":"https://github.com/sourcegraph/go-vcs/pull/80#discussion_r44218678"},"pull_request":{"href":"https://api.github.com/repos/sourcegraph/go-vcs/pulls/80"}}},"pull_request":{"url":"https://api.github.com/repos/sourcegraph/go-vcs/pulls/80","id":49399834,"html_url":"https://github.com/sourcegraph/go-vcs/pull/80","diff_url":"https://github.com/sourcegraph/go-vcs/pull/80.diff","patch_url":"https://github.com/sourcegraph/go-vcs/pull/80.patch","issue_url":"https://api.github.com/repos/sourcegraph/go-vcs/issues/80","number":80,"state":"open","locked":false,"title":"Add UpdateResult to UpdateEverything method.","user":{"login":"shurcooL","id":1924134,"avatar_url":"https://avatars.githubusercontent.com/u/1924134?v=3","gravatar_id":"","url":"https://api.github.com/users/shurcooL","html_url":"https://github.com/shurcooL","followers_url":"https://api.github.com/users/shurcooL/followers","following_url":"https://api.github.com/users/shurcooL/following{/other_user}","gists_url":"https://api.github.com/users/shurcooL/gists{/gist_id}","starred_url":"https://api.github.com/users/shurcooL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shurcooL/subscriptions","organizations_url":"https://api.github.com/users/shurcooL/orgs","repos_url":"https://api.github.com/users/shurcooL/repos","events_url":"https://api.github.com/users/shurcooL/events{/privacy}","received_events_url":"https://api.github.com/users/shurcooL/received_events","type":"User","site_admin":false},"body":"This is an early draft of a sample implementation for proposal #79. It's very easy to refactor and change it.\r\n\r\n- Currently implemented in gitcmd backend only, the new functionality parses the output of `git remote update` operation and returns it to the caller.\r\n\r\n- This is a breaking API change because it adds an extra return parameter to a method of RemoteUpdater interface.\r\n\r\n- Add tests for the parser.\r\n\r\nResolves #79.","created_at":"2015-11-02T06:50:06Z","updated_at":"2015-11-07T23:36:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c16f285a492ec12f53e0c1bb35473a830af9fc7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sourcegraph/go-vcs/pulls/80/commits","review_comments_url":"https://api.github.com/repos/sourcegraph/go-vcs/pulls/80/comments","review_comment_url":"https://api.github.com/repos/sourcegraph/go-vcs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sourcegraph/go-vcs/issues/80/comments","statuses_url":"https://api.github.com/repos/sourcegraph/go-vcs/statuses/a6a26f990c32241b5a6e401aa4ea17b85a3a4063","head":{"label":"shurcooL:remote-update-results","ref":"remote-update-results","sha":"a6a26f990c32241b5a6e401aa4ea17b85a3a4063","user":{"login":"shurcooL","id":1924134,"avatar_url":"https://avatars.githubusercontent.com/u/1924134?v=3","gravatar_id":"","url":"https://api.github.com/users/shurcooL","html_url":"https://github.com/shurcooL","followers_url":"https://api.github.com/users/shurcooL/followers","following_url":"https://api.github.com/users/shurcooL/following{/other_user}","gists_url":"https://api.github.com/users/shurcooL/gists{/gist_id}","starred_url":"https://api.github.com/users/shurcooL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shurcooL/subscriptions","organizations_url":"https://api.github.com/users/shurcooL/orgs","repos_url":"https://api.github.com/users/shurcooL/repos","events_url":"https://api.github.com/users/shurcooL/events{/privacy}","received_events_url":"https://api.github.com/users/shurcooL/received_events","type":"User","site_admin":false},"repo":{"id":45376438,"name":"go-vcs","full_name":"shurcooL/go-vcs","owner":{"login":"shurcooL","id":1924134,"avatar_url":"https://avatars.githubusercontent.com/u/1924134?v=3","gravatar_id":"","url":"https://api.github.com/users/shurcooL","html_url":"https://github.com/shurcooL","followers_url":"https://api.github.com/users/shurcooL/followers","following_url":"https://api.github.com/users/shurcooL/following{/other_user}","gists_url":"https://api.github.com/users/shurcooL/gists{/gist_id}","starred_url":"https://api.github.com/users/shurcooL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shurcooL/subscriptions","organizations_url":"https://api.github.com/users/shurcooL/orgs","repos_url":"https://api.github.com/users/shurcooL/repos","events_url":"https://api.github.com/users/shurcooL/events{/privacy}","received_events_url":"https://api.github.com/users/shurcooL/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shurcooL/go-vcs","description":"manipulate and inspect VCS repositories in Go","fork":true,"url":"https://api.github.com/repos/shurcooL/go-vcs","forks_url":"https://api.github.com/repos/shurcooL/go-vcs/forks","keys_url":"https://api.github.com/repos/shurcooL/go-vcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shurcooL/go-vcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shurcooL/go-vcs/teams","hooks_url":"https://api.github.com/repos/shurcooL/go-vcs/hooks","issue_events_url":"https://api.github.com/repos/shurcooL/go-vcs/issues/events{/number}","events_url":"https://api.github.com/repos/shurcooL/go-vcs/events","assignees_url":"https://api.github.com/repos/shurcooL/go-vcs/assignees{/user}","branches_url":"https://api.github.com/repos/shurcooL/go-vcs/branches{/branch}","tags_url":"https://api.github.com/repos/shurcooL/go-vcs/tags","blobs_url":"https://api.github.com/repos/shurcooL/go-vcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shurcooL/go-vcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shurcooL/go-vcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/shurcooL/go-vcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shurcooL/go-vcs/statuses/{sha}","languages_url":"https://api.github.com/repos/shurcooL/go-vcs/languages","stargazers_url":"https://api.github.com/repos/shurcooL/go-vcs/stargazers","contributors_url":"https://api.github.com/repos/shurcooL/go-vcs/contributors","subscribers_url":"https://api.github.com/repos/shurcooL/go-vcs/subscribers","subscription_url":"https://api.github.com/repos/shurcooL/go-vcs/subscription","commits_url":"https://api.github.com/repos/shurcooL/go-vcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/shurcooL/go-vcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/shurcooL/go-vcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/shurcooL/go-vcs/issues/comments{/number}","contents_url":"https://api.github.com/repos/shurcooL/go-vcs/contents/{+path}","compare_url":"https://api.github.com/repos/shurcooL/go-vcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shurcooL/go-vcs/merges","archive_url":"https://api.github.com/repos/shurcooL/go-vcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shurcooL/go-vcs/downloads","issues_url":"https://api.github.com/repos/shurcooL/go-vcs/issues{/number}","pulls_url":"https://api.github.com/repos/shurcooL/go-vcs/pulls{/number}","milestones_url":"https://api.github.com/repos/shurcooL/go-vcs/milestones{/number}","notifications_url":"https://api.github.com/repos/shurcooL/go-vcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shurcooL/go-vcs/labels{/name}","releases_url":"https://api.github.com/repos/shurcooL/go-vcs/releases{/id}","created_at":"2015-11-02T06:36:08Z","updated_at":"2015-11-02T06:36:09Z","pushed_at":"2015-11-07T23:33:43Z","git_url":"git://github.com/shurcooL/go-vcs.git","ssh_url":"git@github.com:shurcooL/go-vcs.git","clone_url":"https://github.com/shurcooL/go-vcs.git","svn_url":"https://github.com/shurcooL/go-vcs","homepage":"https://sourcegraph.com/sourcegraph/go-vcs","size":652,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"sourcegraph:master","ref":"master","sha":"b630356529fbb3e090b19ec4424009c4e2a1c932","user":{"login":"sourcegraph","id":3979584,"avatar_url":"https://avatars.githubusercontent.com/u/3979584?v=3","gravatar_id":"","url":"https://api.github.com/users/sourcegraph","html_url":"https://github.com/sourcegraph","followers_url":"https://api.github.com/users/sourcegraph/followers","following_url":"https://api.github.com/users/sourcegraph/following{/other_user}","gists_url":"https://api.github.com/users/sourcegraph/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcegraph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcegraph/subscriptions","organizations_url":"https://api.github.com/users/sourcegraph/orgs","repos_url":"https://api.github.com/users/sourcegraph/repos","events_url":"https://api.github.com/users/sourcegraph/events{/privacy}","received_events_url":"https://api.github.com/users/sourcegraph/received_events","type":"Organization","site_admin":false},"repo":{"id":10431493,"name":"go-vcs","full_name":"sourcegraph/go-vcs","owner":{"login":"sourcegraph","id":3979584,"avatar_url":"https://avatars.githubusercontent.com/u/3979584?v=3","gravatar_id":"","url":"https://api.github.com/users/sourcegraph","html_url":"https://github.com/sourcegraph","followers_url":"https://api.github.com/users/sourcegraph/followers","following_url":"https://api.github.com/users/sourcegraph/following{/other_user}","gists_url":"https://api.github.com/users/sourcegraph/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcegraph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcegraph/subscriptions","organizations_url":"https://api.github.com/users/sourcegraph/orgs","repos_url":"https://api.github.com/users/sourcegraph/repos","events_url":"https://api.github.com/users/sourcegraph/events{/privacy}","received_events_url":"https://api.github.com/users/sourcegraph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sourcegraph/go-vcs","description":"manipulate and inspect VCS repositories in Go","fork":false,"url":"https://api.github.com/repos/sourcegraph/go-vcs","forks_url":"https://api.github.com/repos/sourcegraph/go-vcs/forks","keys_url":"https://api.github.com/repos/sourcegraph/go-vcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sourcegraph/go-vcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sourcegraph/go-vcs/teams","hooks_url":"https://api.github.com/repos/sourcegraph/go-vcs/hooks","issue_events_url":"https://api.github.com/repos/sourcegraph/go-vcs/issues/events{/number}","events_url":"https://api.github.com/repos/sourcegraph/go-vcs/events","assignees_url":"https://api.github.com/repos/sourcegraph/go-vcs/assignees{/user}","branches_url":"https://api.github.com/repos/sourcegraph/go-vcs/branches{/branch}","tags_url":"https://api.github.com/repos/sourcegraph/go-vcs/tags","blobs_url":"https://api.github.com/repos/sourcegraph/go-vcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sourcegraph/go-vcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sourcegraph/go-vcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/sourcegraph/go-vcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sourcegraph/go-vcs/statuses/{sha}","languages_url":"https://api.github.com/repos/sourcegraph/go-vcs/languages","stargazers_url":"https://api.github.com/repos/sourcegraph/go-vcs/stargazers","contributors_url":"https://api.github.com/repos/sourcegraph/go-vcs/contributors","subscribers_url":"https://api.github.com/repos/sourcegraph/go-vcs/subscribers","subscription_url":"https://api.github.com/repos/sourcegraph/go-vcs/subscription","commits_url":"https://api.github.com/repos/sourcegraph/go-vcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/sourcegraph/go-vcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/sourcegraph/go-vcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/sourcegraph/go-vcs/issues/comments{/number}","contents_url":"https://api.github.com/repos/sourcegraph/go-vcs/contents/{+path}","compare_url":"https://api.github.com/repos/sourcegraph/go-vcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sourcegraph/go-vcs/merges","archive_url":"https://api.github.com/repos/sourcegraph/go-vcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sourcegraph/go-vcs/downloads","issues_url":"https://api.github.com/repos/sourcegraph/go-vcs/issues{/number}","pulls_url":"https://api.github.com/repos/sourcegraph/go-vcs/pulls{/number}","milestones_url":"https://api.github.com/repos/sourcegraph/go-vcs/milestones{/number}","notifications_url":"https://api.github.com/repos/sourcegraph/go-vcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sourcegraph/go-vcs/labels{/name}","releases_url":"https://api.github.com/repos/sourcegraph/go-vcs/releases{/id}","created_at":"2013-06-02T02:36:18Z","updated_at":"2015-11-07T03:03:47Z","pushed_at":"2015-11-07T23:33:43Z","git_url":"git://github.com/sourcegraph/go-vcs.git","ssh_url":"git@github.com:sourcegraph/go-vcs.git","clone_url":"https://github.com/sourcegraph/go-vcs.git","svn_url":"https://github.com/sourcegraph/go-vcs","homepage":"https://sourcegraph.com/sourcegraph/go-vcs","size":1848,"stargazers_count":32,"watchers_count":32,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":18,"forks":11,"open_issues":18,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sourcegraph/go-vcs/pulls/80"},"html":{"href":"https://github.com/sourcegraph/go-vcs/pull/80"},"issue":{"href":"https://api.github.com/repos/sourcegraph/go-vcs/issues/80"},"comments":{"href":"https://api.github.com/repos/sourcegraph/go-vcs/issues/80/comments"},"review_comments":{"href":"https://api.github.com/repos/sourcegraph/go-vcs/pulls/80/comments"},"review_comment":{"href":"https://api.github.com/repos/sourcegraph/go-vcs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sourcegraph/go-vcs/pulls/80/commits"},"statuses":{"href":"https://api.github.com/repos/sourcegraph/go-vcs/statuses/a6a26f990c32241b5a6e401aa4ea17b85a3a4063"}}}}