{"action":"created","comment":{"url":"https://api.github.com/repos/golang/dep/pulls/comments/132775687","pull_request_review_id":55897721,"id":132775687,"diff_hunk":"@@ -42,37 +45,61 @@ type solution struct {\n \tsolv Solver\n }\n \n-// WriteDepTree takes a basedir and a Lock, and exports all the projects\n-// listed in the lock to the appropriate target location within the basedir.\n+// WriteDepTree takes a baseDir and a Lock, and exports all the projects\n+// listed in the lock to the appropriate target location within baseDir.\n //\n-// If the goal is to populate a vendor directory, basedir should be the absolute\n+// If the goal is to populate a vendor directory, baseDir should be the absolute\n // path to that vendor directory, not its parent (a project root, typically).\n //\n-// It requires a SourceManager to do the work, and takes a flag indicating\n-// whether or not to strip vendor directories contained in the exported\n-// dependencies.\n-func WriteDepTree(basedir string, l Lock, sm SourceManager, sv bool) error {\n+// It requires a SourceManager to do the work, and takes a PruneOptions\n+// indicating the pruning options required for the exported dependencies.\n+func WriteDepTree(baseDir string, l Lock, sm SourceManager, prune PruneOptions, logger *log.Logger) error {","path":"internal/gps/result.go","position":33,"original_position":33,"commit_id":"cac5f610e757f27e2f9ff98d1c5decd415d6341f","original_commit_id":"cac5f610e757f27e2f9ff98d1c5decd415d6341f","user":{"login":"ibrasho","id":188776,"avatar_url":"https://avatars2.githubusercontent.com/u/188776?v=4","gravatar_id":"","url":"https://api.github.com/users/ibrasho","html_url":"https://github.com/ibrasho","followers_url":"https://api.github.com/users/ibrasho/followers","following_url":"https://api.github.com/users/ibrasho/following{/other_user}","gists_url":"https://api.github.com/users/ibrasho/gists{/gist_id}","starred_url":"https://api.github.com/users/ibrasho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibrasho/subscriptions","organizations_url":"https://api.github.com/users/ibrasho/orgs","repos_url":"https://api.github.com/users/ibrasho/repos","events_url":"https://api.github.com/users/ibrasho/events{/privacy}","received_events_url":"https://api.github.com/users/ibrasho/received_events","type":"User","site_admin":false},"body":"This change is needed in both PRs since we need to log what was pruned.","created_at":"2017-08-11T20:19:47Z","updated_at":"2017-08-11T20:19:47Z","html_url":"https://github.com/golang/dep/pull/952#discussion_r132775687","pull_request_url":"https://api.github.com/repos/golang/dep/pulls/952","_links":{"self":{"href":"https://api.github.com/repos/golang/dep/pulls/comments/132775687"},"html":{"href":"https://github.com/golang/dep/pull/952#discussion_r132775687"},"pull_request":{"href":"https://api.github.com/repos/golang/dep/pulls/952"}}},"pull_request":{"url":"https://api.github.com/repos/golang/dep/pulls/952","id":134221445,"html_url":"https://github.com/golang/dep/pull/952","diff_url":"https://github.com/golang/dep/pull/952.diff","patch_url":"https://github.com/golang/dep/pull/952.patch","issue_url":"https://api.github.com/repos/golang/dep/issues/952","number":952,"state":"open","locked":false,"title":"internal/gps: add PruneOptions and update WriteDepTree","user":{"login":"ibrasho","id":188776,"avatar_url":"https://avatars2.githubusercontent.com/u/188776?v=4","gravatar_id":"","url":"https://api.github.com/users/ibrasho","html_url":"https://github.com/ibrasho","followers_url":"https://api.github.com/users/ibrasho/followers","following_url":"https://api.github.com/users/ibrasho/following{/other_user}","gists_url":"https://api.github.com/users/ibrasho/gists{/gist_id}","starred_url":"https://api.github.com/users/ibrasho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibrasho/subscriptions","organizations_url":"https://api.github.com/users/ibrasho/orgs","repos_url":"https://api.github.com/users/ibrasho/repos","events_url":"https://api.github.com/users/ibrasho/events{/privacy}","received_events_url":"https://api.github.com/users/ibrasho/received_events","type":"User","site_admin":false},"body":"### What does this do / why do we need it?\r\n\r\nThis PR updates `gps.WriteDepTree` and `Write` on `dep.*SafeWriter`to accept a `gps.PruneOptions` and a `*log.Logger` to determine the pruning options when writing `vendor/` and to enable verbose pruning.\r\n\r\nThe manifest is updated to accept a new table, `prune`. This table defines pruning options accepted by dep. A constructor for `dep.Manifest` is added to set the default PruneOptions.\r\n\r\nBy default, dep will always prune nested vendor directories.\r\n\r\nUsers can define 3 additional rules:\r\n * `non-go`: Prune non-Go files (will keep LICENSE & COPYING files)\r\n * `go-tests`: Prune Go test files\r\n * `unused-packages`: Prune unused Go packages.\r\n\r\n### What should your reviewer look out for in this PR?\r\n\r\nDesign comments and correctness as usual. \r\n\r\n### Which issue(s) does this PR fix?\r\n\r\nfixes #944 ","created_at":"2017-08-04T18:08:10Z","updated_at":"2017-08-11T20:19:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d743b6a8af6c90692fcf34f2ae2300b011d4d06a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"sdboyer","id":21599,"avatar_url":"https://avatars0.githubusercontent.com/u/21599?v=4","gravatar_id":"","url":"https://api.github.com/users/sdboyer","html_url":"https://github.com/sdboyer","followers_url":"https://api.github.com/users/sdboyer/followers","following_url":"https://api.github.com/users/sdboyer/following{/other_user}","gists_url":"https://api.github.com/users/sdboyer/gists{/gist_id}","starred_url":"https://api.github.com/users/sdboyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdboyer/subscriptions","organizations_url":"https://api.github.com/users/sdboyer/orgs","repos_url":"https://api.github.com/users/sdboyer/repos","events_url":"https://api.github.com/users/sdboyer/events{/privacy}","received_events_url":"https://api.github.com/users/sdboyer/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/golang/dep/pulls/952/commits","review_comments_url":"https://api.github.com/repos/golang/dep/pulls/952/comments","review_comment_url":"https://api.github.com/repos/golang/dep/pulls/comments{/number}","comments_url":"https://api.github.com/repos/golang/dep/issues/952/comments","statuses_url":"https://api.github.com/repos/golang/dep/statuses/cac5f610e757f27e2f9ff98d1c5decd415d6341f","head":{"label":"ibrasho-forks:absorb-prune-into-ensure","ref":"absorb-prune-into-ensure","sha":"cac5f610e757f27e2f9ff98d1c5decd415d6341f","user":{"login":"ibrasho-forks","id":12087573,"avatar_url":"https://avatars0.githubusercontent.com/u/12087573?v=4","gravatar_id":"","url":"https://api.github.com/users/ibrasho-forks","html_url":"https://github.com/ibrasho-forks","followers_url":"https://api.github.com/users/ibrasho-forks/followers","following_url":"https://api.github.com/users/ibrasho-forks/following{/other_user}","gists_url":"https://api.github.com/users/ibrasho-forks/gists{/gist_id}","starred_url":"https://api.github.com/users/ibrasho-forks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibrasho-forks/subscriptions","organizations_url":"https://api.github.com/users/ibrasho-forks/orgs","repos_url":"https://api.github.com/users/ibrasho-forks/repos","events_url":"https://api.github.com/users/ibrasho-forks/events{/privacy}","received_events_url":"https://api.github.com/users/ibrasho-forks/received_events","type":"Organization","site_admin":false},"repo":{"id":90558623,"name":"dep","full_name":"ibrasho-forks/dep","owner":{"login":"ibrasho-forks","id":12087573,"avatar_url":"https://avatars0.githubusercontent.com/u/12087573?v=4","gravatar_id":"","url":"https://api.github.com/users/ibrasho-forks","html_url":"https://github.com/ibrasho-forks","followers_url":"https://api.github.com/users/ibrasho-forks/followers","following_url":"https://api.github.com/users/ibrasho-forks/following{/other_user}","gists_url":"https://api.github.com/users/ibrasho-forks/gists{/gist_id}","starred_url":"https://api.github.com/users/ibrasho-forks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibrasho-forks/subscriptions","organizations_url":"https://api.github.com/users/ibrasho-forks/orgs","repos_url":"https://api.github.com/users/ibrasho-forks/repos","events_url":"https://api.github.com/users/ibrasho-forks/events{/privacy}","received_events_url":"https://api.github.com/users/ibrasho-forks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ibrasho-forks/dep","description":"Go dependency tool","fork":true,"url":"https://api.github.com/repos/ibrasho-forks/dep","forks_url":"https://api.github.com/repos/ibrasho-forks/dep/forks","keys_url":"https://api.github.com/repos/ibrasho-forks/dep/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ibrasho-forks/dep/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ibrasho-forks/dep/teams","hooks_url":"https://api.github.com/repos/ibrasho-forks/dep/hooks","issue_events_url":"https://api.github.com/repos/ibrasho-forks/dep/issues/events{/number}","events_url":"https://api.github.com/repos/ibrasho-forks/dep/events","assignees_url":"https://api.github.com/repos/ibrasho-forks/dep/assignees{/user}","branches_url":"https://api.github.com/repos/ibrasho-forks/dep/branches{/branch}","tags_url":"https://api.github.com/repos/ibrasho-forks/dep/tags","blobs_url":"https://api.github.com/repos/ibrasho-forks/dep/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ibrasho-forks/dep/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ibrasho-forks/dep/git/refs{/sha}","trees_url":"https://api.github.com/repos/ibrasho-forks/dep/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ibrasho-forks/dep/statuses/{sha}","languages_url":"https://api.github.com/repos/ibrasho-forks/dep/languages","stargazers_url":"https://api.github.com/repos/ibrasho-forks/dep/stargazers","contributors_url":"https://api.github.com/repos/ibrasho-forks/dep/contributors","subscribers_url":"https://api.github.com/repos/ibrasho-forks/dep/subscribers","subscription_url":"https://api.github.com/repos/ibrasho-forks/dep/subscription","commits_url":"https://api.github.com/repos/ibrasho-forks/dep/commits{/sha}","git_commits_url":"https://api.github.com/repos/ibrasho-forks/dep/git/commits{/sha}","comments_url":"https://api.github.com/repos/ibrasho-forks/dep/comments{/number}","issue_comment_url":"https://api.github.com/repos/ibrasho-forks/dep/issues/comments{/number}","contents_url":"https://api.github.com/repos/ibrasho-forks/dep/contents/{+path}","compare_url":"https://api.github.com/repos/ibrasho-forks/dep/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ibrasho-forks/dep/merges","archive_url":"https://api.github.com/repos/ibrasho-forks/dep/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ibrasho-forks/dep/downloads","issues_url":"https://api.github.com/repos/ibrasho-forks/dep/issues{/number}","pulls_url":"https://api.github.com/repos/ibrasho-forks/dep/pulls{/number}","milestones_url":"https://api.github.com/repos/ibrasho-forks/dep/milestones{/number}","notifications_url":"https://api.github.com/repos/ibrasho-forks/dep/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ibrasho-forks/dep/labels{/name}","releases_url":"https://api.github.com/repos/ibrasho-forks/dep/releases{/id}","deployments_url":"https://api.github.com/repos/ibrasho-forks/dep/deployments","created_at":"2017-05-07T20:06:55Z","updated_at":"2017-05-07T20:06:57Z","pushed_at":"2017-08-09T17:38:42Z","git_url":"git://github.com/ibrasho-forks/dep.git","ssh_url":"git@github.com:ibrasho-forks/dep.git","clone_url":"https://github.com/ibrasho-forks/dep.git","svn_url":"https://github.com/ibrasho-forks/dep","homepage":null,"size":3357,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"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":"golang:master","ref":"master","sha":"c80fab842bf3b76aa40a3d968f99c0fe12da4433","user":{"login":"golang","id":4314092,"avatar_url":"https://avatars3.githubusercontent.com/u/4314092?v=4","gravatar_id":"","url":"https://api.github.com/users/golang","html_url":"https://github.com/golang","followers_url":"https://api.github.com/users/golang/followers","following_url":"https://api.github.com/users/golang/following{/other_user}","gists_url":"https://api.github.com/users/golang/gists{/gist_id}","starred_url":"https://api.github.com/users/golang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/golang/subscriptions","organizations_url":"https://api.github.com/users/golang/orgs","repos_url":"https://api.github.com/users/golang/repos","events_url":"https://api.github.com/users/golang/events{/privacy}","received_events_url":"https://api.github.com/users/golang/received_events","type":"Organization","site_admin":false},"repo":{"id":70202506,"name":"dep","full_name":"golang/dep","owner":{"login":"golang","id":4314092,"avatar_url":"https://avatars3.githubusercontent.com/u/4314092?v=4","gravatar_id":"","url":"https://api.github.com/users/golang","html_url":"https://github.com/golang","followers_url":"https://api.github.com/users/golang/followers","following_url":"https://api.github.com/users/golang/following{/other_user}","gists_url":"https://api.github.com/users/golang/gists{/gist_id}","starred_url":"https://api.github.com/users/golang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/golang/subscriptions","organizations_url":"https://api.github.com/users/golang/orgs","repos_url":"https://api.github.com/users/golang/repos","events_url":"https://api.github.com/users/golang/events{/privacy}","received_events_url":"https://api.github.com/users/golang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/golang/dep","description":"Go dependency management tool","fork":false,"url":"https://api.github.com/repos/golang/dep","forks_url":"https://api.github.com/repos/golang/dep/forks","keys_url":"https://api.github.com/repos/golang/dep/keys{/key_id}","collaborators_url":"https://api.github.com/repos/golang/dep/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/golang/dep/teams","hooks_url":"https://api.github.com/repos/golang/dep/hooks","issue_events_url":"https://api.github.com/repos/golang/dep/issues/events{/number}","events_url":"https://api.github.com/repos/golang/dep/events","assignees_url":"https://api.github.com/repos/golang/dep/assignees{/user}","branches_url":"https://api.github.com/repos/golang/dep/branches{/branch}","tags_url":"https://api.github.com/repos/golang/dep/tags","blobs_url":"https://api.github.com/repos/golang/dep/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/golang/dep/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/golang/dep/git/refs{/sha}","trees_url":"https://api.github.com/repos/golang/dep/git/trees{/sha}","statuses_url":"https://api.github.com/repos/golang/dep/statuses/{sha}","languages_url":"https://api.github.com/repos/golang/dep/languages","stargazers_url":"https://api.github.com/repos/golang/dep/stargazers","contributors_url":"https://api.github.com/repos/golang/dep/contributors","subscribers_url":"https://api.github.com/repos/golang/dep/subscribers","subscription_url":"https://api.github.com/repos/golang/dep/subscription","commits_url":"https://api.github.com/repos/golang/dep/commits{/sha}","git_commits_url":"https://api.github.com/repos/golang/dep/git/commits{/sha}","comments_url":"https://api.github.com/repos/golang/dep/comments{/number}","issue_comment_url":"https://api.github.com/repos/golang/dep/issues/comments{/number}","contents_url":"https://api.github.com/repos/golang/dep/contents/{+path}","compare_url":"https://api.github.com/repos/golang/dep/compare/{base}...{head}","merges_url":"https://api.github.com/repos/golang/dep/merges","archive_url":"https://api.github.com/repos/golang/dep/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/golang/dep/downloads","issues_url":"https://api.github.com/repos/golang/dep/issues{/number}","pulls_url":"https://api.github.com/repos/golang/dep/pulls{/number}","milestones_url":"https://api.github.com/repos/golang/dep/milestones{/number}","notifications_url":"https://api.github.com/repos/golang/dep/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/golang/dep/labels{/name}","releases_url":"https://api.github.com/repos/golang/dep/releases{/id}","deployments_url":"https://api.github.com/repos/golang/dep/deployments","created_at":"2016-10-07T00:04:51Z","updated_at":"2017-08-11T19:18:11Z","pushed_at":"2017-08-11T18:59:26Z","git_url":"git://github.com/golang/dep.git","ssh_url":"git@github.com:golang/dep.git","clone_url":"https://github.com/golang/dep.git","svn_url":"https://github.com/golang/dep","homepage":"","size":3355,"stargazers_count":4081,"watchers_count":4081,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":235,"mirror_url":null,"open_issues_count":207,"forks":235,"open_issues":207,"watchers":4081,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/golang/dep/pulls/952"},"html":{"href":"https://github.com/golang/dep/pull/952"},"issue":{"href":"https://api.github.com/repos/golang/dep/issues/952"},"comments":{"href":"https://api.github.com/repos/golang/dep/issues/952/comments"},"review_comments":{"href":"https://api.github.com/repos/golang/dep/pulls/952/comments"},"review_comment":{"href":"https://api.github.com/repos/golang/dep/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/golang/dep/pulls/952/commits"},"statuses":{"href":"https://api.github.com/repos/golang/dep/statuses/cac5f610e757f27e2f9ff98d1c5decd415d6341f"}}}}
{"actor":{"display_login":"ibrasho"}}