{"action":"created","comment":{"url":"https://api.github.com/repos/docker/docker/pulls/comments/29492708","id":29492708,"diff_hunk":"@@ -0,0 +1,52 @@\n+package client\n+\n+import (\n+\t\"encoding/json\"\n+\t\"fmt\"\n+\n+\t\"github.com/docker/docker/api/types\"\n+\t\"github.com/docker/docker/pkg/archive\"\n+\tflag \"github.com/docker/docker/pkg/mflag\"\n+)\n+\n+// CmdDiffi shows changes on an images's filesystem.\n+//\n+// Each changed file is printed on a separate line, prefixed with a single\n+// character that indicates the status of the file: C (modified), A (added),\n+// or D (deleted).\n+//\n+// Usage: docker diffi IMAGE\n+func (cli *DockerCli) CmdDiffi(args ...string) error {\n+\tcmd := cli.Subcmd(\"diffi\", \"IMAGE\", \"Inspect changes on a image's filesystem\", true)\n+\tcmd.Require(flag.Exact, 1)\n+\tcmd.ParseFlags(args, true)\n+\n+\tif cmd.Arg(0) == \"\" {\n+\t\treturn fmt.Errorf(\"Image name cannot be empty\")\n+\t}\n+\n+\trdr, _, err := cli.call(\"GET\", \"/images/\"+cmd.Arg(0)+\"/changes\", nil, nil)\n+\tif err != nil {\n+\t\treturn err\n+\t}\n+\n+\tchanges := []types.ContainerChange{}\n+\tif err := json.NewDecoder(rdr).Decode(&changes); err != nil {\n+\t\treturn err\n+\t}\n+\n+\tfor _, change := range changes {\n+\t\tvar kind string\n+\t\tswitch change.Kind {\n+\t\tcase archive.ChangeModify:\n+\t\t\tkind = \"C\"\n+\t\tcase archive.ChangeAdd:\n+\t\t\tkind = \"A\"\n+\t\tcase archive.ChangeDelete:\n+\t\t\tkind = \"D\"\n+\t\t}\n+\t\tfmt.Fprintf(cli.out, \"%s %s\\n\", kind, change.Path)","path":"api/client/diffi.go","position":48,"original_position":48,"commit_id":"ab3ee2bbd2b788d2accdbf6873280051b48e60fe","original_commit_id":"ab3ee2bbd2b788d2accdbf6873280051b48e60fe","user":{"login":"tcurdt","id":13697,"avatar_url":"https://avatars.githubusercontent.com/u/13697?v=3","gravatar_id":"","url":"https://api.github.com/users/tcurdt","html_url":"https://github.com/tcurdt","followers_url":"https://api.github.com/users/tcurdt/followers","following_url":"https://api.github.com/users/tcurdt/following{/other_user}","gists_url":"https://api.github.com/users/tcurdt/gists{/gist_id}","starred_url":"https://api.github.com/users/tcurdt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcurdt/subscriptions","organizations_url":"https://api.github.com/users/tcurdt/orgs","repos_url":"https://api.github.com/users/tcurdt/repos","events_url":"https://api.github.com/users/tcurdt/events{/privacy}","received_events_url":"https://api.github.com/users/tcurdt/received_events","type":"User","site_admin":false},"body":"Hm. Since the change type does not have a size attribute - how could we get the size of the change.\r\nI guess best would be to add it to the struct so we don't have to change the driver protocol.\r\n\r\n  https://github.com/docker/docker/blob/master/daemon/graphdriver/driver.go#L115\r\n\r\nBut adding it to the driver doesn't seem to be so easy\r\n\r\n  https://github.com/docker/docker/blob/master/daemon/graphdriver/aufs/aufs.go#L352\r\n\r\nunless we could use this here too for size:\r\n\r\n  https://github.com/docker/docker/blob/master/daemon/graphdriver/aufs/aufs.go#L328","created_at":"2015-05-01T07:38:01Z","updated_at":"2015-05-01T07:38:01Z","html_url":"https://github.com/docker/docker/pull/12919#discussion_r29492708","pull_request_url":"https://api.github.com/repos/docker/docker/pulls/12919","_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/29492708"},"html":{"href":"https://github.com/docker/docker/pull/12919#discussion_r29492708"},"pull_request":{"href":"https://api.github.com/repos/docker/docker/pulls/12919"}}},"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/12919","id":34523299,"html_url":"https://github.com/docker/docker/pull/12919","diff_url":"https://github.com/docker/docker/pull/12919.diff","patch_url":"https://github.com/docker/docker/pull/12919.patch","issue_url":"https://api.github.com/repos/docker/docker/issues/12919","number":12919,"state":"open","locked":false,"title":"diffi command to inspect changes on image filesystem","user":{"login":"ashwinphatak","id":14833,"avatar_url":"https://avatars.githubusercontent.com/u/14833?v=3","gravatar_id":"","url":"https://api.github.com/users/ashwinphatak","html_url":"https://github.com/ashwinphatak","followers_url":"https://api.github.com/users/ashwinphatak/followers","following_url":"https://api.github.com/users/ashwinphatak/following{/other_user}","gists_url":"https://api.github.com/users/ashwinphatak/gists{/gist_id}","starred_url":"https://api.github.com/users/ashwinphatak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashwinphatak/subscriptions","organizations_url":"https://api.github.com/users/ashwinphatak/orgs","repos_url":"https://api.github.com/users/ashwinphatak/repos","events_url":"https://api.github.com/users/ashwinphatak/events{/privacy}","received_events_url":"https://api.github.com/users/ashwinphatak/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Ashwin Phatak <ashwinpphatak@gmail.com>","created_at":"2015-05-01T06:11:49Z","updated_at":"2015-05-01T07:38:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0dda0306a92addbcf372246e08df2b675812b947","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/docker/pulls/12919/commits","review_comments_url":"https://api.github.com/repos/docker/docker/pulls/12919/comments","review_comment_url":"https://api.github.com/repos/docker/docker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/docker/issues/12919/comments","statuses_url":"https://api.github.com/repos/docker/docker/statuses/ab3ee2bbd2b788d2accdbf6873280051b48e60fe","head":{"label":"ashwinphatak:image_diff","ref":"image_diff","sha":"ab3ee2bbd2b788d2accdbf6873280051b48e60fe","user":{"login":"ashwinphatak","id":14833,"avatar_url":"https://avatars.githubusercontent.com/u/14833?v=3","gravatar_id":"","url":"https://api.github.com/users/ashwinphatak","html_url":"https://github.com/ashwinphatak","followers_url":"https://api.github.com/users/ashwinphatak/followers","following_url":"https://api.github.com/users/ashwinphatak/following{/other_user}","gists_url":"https://api.github.com/users/ashwinphatak/gists{/gist_id}","starred_url":"https://api.github.com/users/ashwinphatak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashwinphatak/subscriptions","organizations_url":"https://api.github.com/users/ashwinphatak/orgs","repos_url":"https://api.github.com/users/ashwinphatak/repos","events_url":"https://api.github.com/users/ashwinphatak/events{/privacy}","received_events_url":"https://api.github.com/users/ashwinphatak/received_events","type":"User","site_admin":false},"repo":{"id":33920040,"name":"docker","full_name":"ashwinphatak/docker","owner":{"login":"ashwinphatak","id":14833,"avatar_url":"https://avatars.githubusercontent.com/u/14833?v=3","gravatar_id":"","url":"https://api.github.com/users/ashwinphatak","html_url":"https://github.com/ashwinphatak","followers_url":"https://api.github.com/users/ashwinphatak/followers","following_url":"https://api.github.com/users/ashwinphatak/following{/other_user}","gists_url":"https://api.github.com/users/ashwinphatak/gists{/gist_id}","starred_url":"https://api.github.com/users/ashwinphatak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashwinphatak/subscriptions","organizations_url":"https://api.github.com/users/ashwinphatak/orgs","repos_url":"https://api.github.com/users/ashwinphatak/repos","events_url":"https://api.github.com/users/ashwinphatak/events{/privacy}","received_events_url":"https://api.github.com/users/ashwinphatak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ashwinphatak/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/ashwinphatak/docker","forks_url":"https://api.github.com/repos/ashwinphatak/docker/forks","keys_url":"https://api.github.com/repos/ashwinphatak/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ashwinphatak/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ashwinphatak/docker/teams","hooks_url":"https://api.github.com/repos/ashwinphatak/docker/hooks","issue_events_url":"https://api.github.com/repos/ashwinphatak/docker/issues/events{/number}","events_url":"https://api.github.com/repos/ashwinphatak/docker/events","assignees_url":"https://api.github.com/repos/ashwinphatak/docker/assignees{/user}","branches_url":"https://api.github.com/repos/ashwinphatak/docker/branches{/branch}","tags_url":"https://api.github.com/repos/ashwinphatak/docker/tags","blobs_url":"https://api.github.com/repos/ashwinphatak/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ashwinphatak/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ashwinphatak/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ashwinphatak/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ashwinphatak/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/ashwinphatak/docker/languages","stargazers_url":"https://api.github.com/repos/ashwinphatak/docker/stargazers","contributors_url":"https://api.github.com/repos/ashwinphatak/docker/contributors","subscribers_url":"https://api.github.com/repos/ashwinphatak/docker/subscribers","subscription_url":"https://api.github.com/repos/ashwinphatak/docker/subscription","commits_url":"https://api.github.com/repos/ashwinphatak/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ashwinphatak/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ashwinphatak/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ashwinphatak/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ashwinphatak/docker/contents/{+path}","compare_url":"https://api.github.com/repos/ashwinphatak/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ashwinphatak/docker/merges","archive_url":"https://api.github.com/repos/ashwinphatak/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ashwinphatak/docker/downloads","issues_url":"https://api.github.com/repos/ashwinphatak/docker/issues{/number}","pulls_url":"https://api.github.com/repos/ashwinphatak/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/ashwinphatak/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/ashwinphatak/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ashwinphatak/docker/labels{/name}","releases_url":"https://api.github.com/repos/ashwinphatak/docker/releases{/id}","created_at":"2015-04-14T08:31:36Z","updated_at":"2015-04-28T01:53:48Z","pushed_at":"2015-05-01T06:49:53Z","git_url":"git://github.com/ashwinphatak/docker.git","ssh_url":"git@github.com:ashwinphatak/docker.git","clone_url":"https://github.com/ashwinphatak/docker.git","svn_url":"https://github.com/ashwinphatak/docker","homepage":"http://www.docker.com","size":51307,"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":"docker:master","ref":"master","sha":"79d086c47d61f6da522a0e586005a02dae9b5ede","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":7691631,"name":"docker","full_name":"docker/docker","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/docker","description":"Docker - the open-source application container engine","fork":false,"url":"https://api.github.com/repos/docker/docker","forks_url":"https://api.github.com/repos/docker/docker/forks","keys_url":"https://api.github.com/repos/docker/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/docker/teams","hooks_url":"https://api.github.com/repos/docker/docker/hooks","issue_events_url":"https://api.github.com/repos/docker/docker/issues/events{/number}","events_url":"https://api.github.com/repos/docker/docker/events","assignees_url":"https://api.github.com/repos/docker/docker/assignees{/user}","branches_url":"https://api.github.com/repos/docker/docker/branches{/branch}","tags_url":"https://api.github.com/repos/docker/docker/tags","blobs_url":"https://api.github.com/repos/docker/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/docker/languages","stargazers_url":"https://api.github.com/repos/docker/docker/stargazers","contributors_url":"https://api.github.com/repos/docker/docker/contributors","subscribers_url":"https://api.github.com/repos/docker/docker/subscribers","subscription_url":"https://api.github.com/repos/docker/docker/subscription","commits_url":"https://api.github.com/repos/docker/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/docker/contents/{+path}","compare_url":"https://api.github.com/repos/docker/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/docker/merges","archive_url":"https://api.github.com/repos/docker/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/docker/downloads","issues_url":"https://api.github.com/repos/docker/docker/issues{/number}","pulls_url":"https://api.github.com/repos/docker/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/docker/labels{/name}","releases_url":"https://api.github.com/repos/docker/docker/releases{/id}","created_at":"2013-01-18T18:10:57Z","updated_at":"2015-05-01T07:35:17Z","pushed_at":"2015-05-01T06:49:57Z","git_url":"git://github.com/docker/docker.git","ssh_url":"git@github.com:docker/docker.git","clone_url":"https://github.com/docker/docker.git","svn_url":"https://github.com/docker/docker","homepage":"http://www.docker.com","size":195366,"stargazers_count":21282,"watchers_count":21282,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4947,"mirror_url":null,"open_issues_count":966,"forks":4947,"open_issues":966,"watchers":21282,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/12919"},"html":{"href":"https://github.com/docker/docker/pull/12919"},"issue":{"href":"https://api.github.com/repos/docker/docker/issues/12919"},"comments":{"href":"https://api.github.com/repos/docker/docker/issues/12919/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/docker/pulls/12919/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/docker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/docker/pulls/12919/commits"},"statuses":{"href":"https://api.github.com/repos/docker/docker/statuses/ab3ee2bbd2b788d2accdbf6873280051b48e60fe"}}}}