{"action":"created","comment":{"url":"https://api.github.com/repos/alexcrichton/cargo-vendor/pulls/comments/229846208","pull_request_review_id":170445059,"id":229846208,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTg0NjIwOA==","diff_hunk":"@@ -505,17 +510,41 @@ fn cp_r(src: &Path,\n                 }\n             }\n             _ => ()\n+        };\n+\n+        // Join pathname components individually to make sure that the joined\n+        // path uses the correct directory separators everywhere, since\n+        // `relative` may use Unix-style and `dst` may require Windows-style\n+        // backslashes.\n+        let dst = relative.iter().fold(dst.to_owned(), |acc, component| {\n+            acc.join(&component)\n+        });\n+\n+        // Create any necessary directories for the given file.  We may need\n+        // to create multiple directories, so loop until we find a directory\n+        // we've already created.\n+        let mut to_create = Vec::new();","path":"src/main.rs","position":55,"original_position":55,"commit_id":"9632c651848e53aafcd06090e587ea969ca60443","original_commit_id":"9632c651848e53aafcd06090e587ea969ca60443","user":{"login":"froydnj","id":151096,"node_id":"MDQ6VXNlcjE1MTA5Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/151096?v=4","gravatar_id":"","url":"https://api.github.com/users/froydnj","html_url":"https://github.com/froydnj","followers_url":"https://api.github.com/users/froydnj/followers","following_url":"https://api.github.com/users/froydnj/following{/other_user}","gists_url":"https://api.github.com/users/froydnj/gists{/gist_id}","starred_url":"https://api.github.com/users/froydnj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/froydnj/subscriptions","organizations_url":"https://api.github.com/users/froydnj/orgs","repos_url":"https://api.github.com/users/froydnj/repos","events_url":"https://api.github.com/users/froydnj/events{/privacy}","received_events_url":"https://api.github.com/users/froydnj/received_events","type":"User","site_admin":false},"body":"I'd be fine with just doing `create_dir_all` and dispensing with the loop and `created_directories` entirely.  The intent here was to try to minimize the amount of filesystem I/O, but maybe it doesn't matter that much?  It felt like lots of deeply nested directories, possibly combined with numerous files in them, would make `create_dir_all` expensive, but that might just be premature optimization.","created_at":"2018-10-31T19:58:51Z","updated_at":"2018-10-31T19:58:51Z","html_url":"https://github.com/alexcrichton/cargo-vendor/pull/139#discussion_r229846208","pull_request_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/pulls/139","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/alexcrichton/cargo-vendor/pulls/comments/229846208"},"html":{"href":"https://github.com/alexcrichton/cargo-vendor/pull/139#discussion_r229846208"},"pull_request":{"href":"https://api.github.com/repos/alexcrichton/cargo-vendor/pulls/139"}},"in_reply_to_id":229844217},"pull_request":{"url":"https://api.github.com/repos/alexcrichton/cargo-vendor/pulls/139","id":227368547,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3MzY4NTQ3","html_url":"https://github.com/alexcrichton/cargo-vendor/pull/139","diff_url":"https://github.com/alexcrichton/cargo-vendor/pull/139.diff","patch_url":"https://github.com/alexcrichton/cargo-vendor/pull/139.patch","issue_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/issues/139","number":139,"state":"open","locked":false,"title":"use cargo::sources to determine files to copy for vendoring","user":{"login":"froydnj","id":151096,"node_id":"MDQ6VXNlcjE1MTA5Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/151096?v=4","gravatar_id":"","url":"https://api.github.com/users/froydnj","html_url":"https://github.com/froydnj","followers_url":"https://api.github.com/users/froydnj/followers","following_url":"https://api.github.com/users/froydnj/following{/other_user}","gists_url":"https://api.github.com/users/froydnj/gists{/gist_id}","starred_url":"https://api.github.com/users/froydnj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/froydnj/subscriptions","organizations_url":"https://api.github.com/users/froydnj/orgs","repos_url":"https://api.github.com/users/froydnj/repos","events_url":"https://api.github.com/users/froydnj/events{/privacy}","received_events_url":"https://api.github.com/users/froydnj/received_events","type":"User","site_admin":false},"body":"This change has the effect of honoring package.{include,exclude}, and it\r\nalso correctly handles vendoring from non-crates.io sources when the\r\nvendored crate contains depended-upon crates.\r\n\r\nFixes #137.","created_at":"2018-10-31T17:03:14Z","updated_at":"2018-10-31T19:58:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c2fc181b9ecdd36535ebf00ab853eeaf3a05deb8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/pulls/139/commits","review_comments_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/pulls/139/comments","review_comment_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/issues/139/comments","statuses_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/statuses/9632c651848e53aafcd06090e587ea969ca60443","head":{"label":"froydnj:honor-package-include","ref":"honor-package-include","sha":"9632c651848e53aafcd06090e587ea969ca60443","user":{"login":"froydnj","id":151096,"node_id":"MDQ6VXNlcjE1MTA5Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/151096?v=4","gravatar_id":"","url":"https://api.github.com/users/froydnj","html_url":"https://github.com/froydnj","followers_url":"https://api.github.com/users/froydnj/followers","following_url":"https://api.github.com/users/froydnj/following{/other_user}","gists_url":"https://api.github.com/users/froydnj/gists{/gist_id}","starred_url":"https://api.github.com/users/froydnj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/froydnj/subscriptions","organizations_url":"https://api.github.com/users/froydnj/orgs","repos_url":"https://api.github.com/users/froydnj/repos","events_url":"https://api.github.com/users/froydnj/events{/privacy}","received_events_url":"https://api.github.com/users/froydnj/received_events","type":"User","site_admin":false},"repo":{"id":155592033,"node_id":"MDEwOlJlcG9zaXRvcnkxNTU1OTIwMzM=","name":"cargo-vendor","full_name":"froydnj/cargo-vendor","private":false,"owner":{"login":"froydnj","id":151096,"node_id":"MDQ6VXNlcjE1MTA5Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/151096?v=4","gravatar_id":"","url":"https://api.github.com/users/froydnj","html_url":"https://github.com/froydnj","followers_url":"https://api.github.com/users/froydnj/followers","following_url":"https://api.github.com/users/froydnj/following{/other_user}","gists_url":"https://api.github.com/users/froydnj/gists{/gist_id}","starred_url":"https://api.github.com/users/froydnj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/froydnj/subscriptions","organizations_url":"https://api.github.com/users/froydnj/orgs","repos_url":"https://api.github.com/users/froydnj/repos","events_url":"https://api.github.com/users/froydnj/events{/privacy}","received_events_url":"https://api.github.com/users/froydnj/received_events","type":"User","site_admin":false},"html_url":"https://github.com/froydnj/cargo-vendor","description":"Cargo subcommand to vendor crates.io dependencies","fork":true,"url":"https://api.github.com/repos/froydnj/cargo-vendor","forks_url":"https://api.github.com/repos/froydnj/cargo-vendor/forks","keys_url":"https://api.github.com/repos/froydnj/cargo-vendor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/froydnj/cargo-vendor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/froydnj/cargo-vendor/teams","hooks_url":"https://api.github.com/repos/froydnj/cargo-vendor/hooks","issue_events_url":"https://api.github.com/repos/froydnj/cargo-vendor/issues/events{/number}","events_url":"https://api.github.com/repos/froydnj/cargo-vendor/events","assignees_url":"https://api.github.com/repos/froydnj/cargo-vendor/assignees{/user}","branches_url":"https://api.github.com/repos/froydnj/cargo-vendor/branches{/branch}","tags_url":"https://api.github.com/repos/froydnj/cargo-vendor/tags","blobs_url":"https://api.github.com/repos/froydnj/cargo-vendor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/froydnj/cargo-vendor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/froydnj/cargo-vendor/git/refs{/sha}","trees_url":"https://api.github.com/repos/froydnj/cargo-vendor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/froydnj/cargo-vendor/statuses/{sha}","languages_url":"https://api.github.com/repos/froydnj/cargo-vendor/languages","stargazers_url":"https://api.github.com/repos/froydnj/cargo-vendor/stargazers","contributors_url":"https://api.github.com/repos/froydnj/cargo-vendor/contributors","subscribers_url":"https://api.github.com/repos/froydnj/cargo-vendor/subscribers","subscription_url":"https://api.github.com/repos/froydnj/cargo-vendor/subscription","commits_url":"https://api.github.com/repos/froydnj/cargo-vendor/commits{/sha}","git_commits_url":"https://api.github.com/repos/froydnj/cargo-vendor/git/commits{/sha}","comments_url":"https://api.github.com/repos/froydnj/cargo-vendor/comments{/number}","issue_comment_url":"https://api.github.com/repos/froydnj/cargo-vendor/issues/comments{/number}","contents_url":"https://api.github.com/repos/froydnj/cargo-vendor/contents/{+path}","compare_url":"https://api.github.com/repos/froydnj/cargo-vendor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/froydnj/cargo-vendor/merges","archive_url":"https://api.github.com/repos/froydnj/cargo-vendor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/froydnj/cargo-vendor/downloads","issues_url":"https://api.github.com/repos/froydnj/cargo-vendor/issues{/number}","pulls_url":"https://api.github.com/repos/froydnj/cargo-vendor/pulls{/number}","milestones_url":"https://api.github.com/repos/froydnj/cargo-vendor/milestones{/number}","notifications_url":"https://api.github.com/repos/froydnj/cargo-vendor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/froydnj/cargo-vendor/labels{/name}","releases_url":"https://api.github.com/repos/froydnj/cargo-vendor/releases{/id}","deployments_url":"https://api.github.com/repos/froydnj/cargo-vendor/deployments","created_at":"2018-10-31T16:46:29Z","updated_at":"2018-10-31T16:46:31Z","pushed_at":"2018-10-31T19:44:23Z","git_url":"git://github.com/froydnj/cargo-vendor.git","ssh_url":"git@github.com:froydnj/cargo-vendor.git","clone_url":"https://github.com/froydnj/cargo-vendor.git","svn_url":"https://github.com/froydnj/cargo-vendor","homepage":null,"size":4577,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"alexcrichton:master","ref":"master","sha":"8abf24f1348ede381f8504ed5001bf8d908d9483","user":{"login":"alexcrichton","id":64996,"node_id":"MDQ6VXNlcjY0OTk2","avatar_url":"https://avatars1.githubusercontent.com/u/64996?v=4","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"repo":{"id":41324618,"node_id":"MDEwOlJlcG9zaXRvcnk0MTMyNDYxOA==","name":"cargo-vendor","full_name":"alexcrichton/cargo-vendor","private":false,"owner":{"login":"alexcrichton","id":64996,"node_id":"MDQ6VXNlcjY0OTk2","avatar_url":"https://avatars1.githubusercontent.com/u/64996?v=4","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"html_url":"https://github.com/alexcrichton/cargo-vendor","description":"Cargo subcommand to vendor crates.io dependencies","fork":false,"url":"https://api.github.com/repos/alexcrichton/cargo-vendor","forks_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/forks","keys_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/teams","hooks_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/hooks","issue_events_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/issues/events{/number}","events_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/events","assignees_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/assignees{/user}","branches_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/branches{/branch}","tags_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/tags","blobs_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/statuses/{sha}","languages_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/languages","stargazers_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/stargazers","contributors_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/contributors","subscribers_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/subscribers","subscription_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/subscription","commits_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/contents/{+path}","compare_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/merges","archive_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/downloads","issues_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/issues{/number}","pulls_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/pulls{/number}","milestones_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/milestones{/number}","notifications_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/labels{/name}","releases_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/releases{/id}","deployments_url":"https://api.github.com/repos/alexcrichton/cargo-vendor/deployments","created_at":"2015-08-24T20:10:07Z","updated_at":"2018-10-31T14:49:12Z","pushed_at":"2018-10-31T19:44:25Z","git_url":"git://github.com/alexcrichton/cargo-vendor.git","ssh_url":"git@github.com:alexcrichton/cargo-vendor.git","clone_url":"https://github.com/alexcrichton/cargo-vendor.git","svn_url":"https://github.com/alexcrichton/cargo-vendor","homepage":null,"size":4575,"stargazers_count":195,"watchers_count":195,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":31,"open_issues":16,"watchers":195,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alexcrichton/cargo-vendor/pulls/139"},"html":{"href":"https://github.com/alexcrichton/cargo-vendor/pull/139"},"issue":{"href":"https://api.github.com/repos/alexcrichton/cargo-vendor/issues/139"},"comments":{"href":"https://api.github.com/repos/alexcrichton/cargo-vendor/issues/139/comments"},"review_comments":{"href":"https://api.github.com/repos/alexcrichton/cargo-vendor/pulls/139/comments"},"review_comment":{"href":"https://api.github.com/repos/alexcrichton/cargo-vendor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alexcrichton/cargo-vendor/pulls/139/commits"},"statuses":{"href":"https://api.github.com/repos/alexcrichton/cargo-vendor/statuses/9632c651848e53aafcd06090e587ea969ca60443"}},"author_association":"NONE"}}
{"actor":{"display_login":"froydnj"}}