{"action":"created","comment":{"url":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments/80365084","id":80365084,"diff_hunk":"@@ -71,24 +71,42 @@ public class GitRepositoryProvider: RepositoryProvider {\n     public func cloneCheckout(\n         repository: RepositorySpecifier,\n         at sourcePath: AbsolutePath,\n-        to destinationPath: AbsolutePath\n+        to destinationPath: AbsolutePath,\n+        editable: Bool\n     ) throws {\n-        // Clone using a shared object store with the canonical copy.\n-        //\n-        // We currently expect using shared storage here to be safe because we\n-        // only ever expect to attempt to use the working copy to materialize a\n-        // revision we selected in response to dependency resolution, and if we\n-        // re-resolve such that the objects in this repository changed, we would\n-        // only ever expect to get back a revision that remains present in the\n-        // object storage.\n-        //\n-        // NOTE: The above assumption may become violated once we have support\n-        // for editable packages, if we are also using this method to get that\n-        // copy. At that point we may need to expose control over this.\n-        //\n-        // FIXME: Need to think about & handle submodules.\n-        try system(\n-                Git.tool, \"clone\", \"--shared\", sourcePath.asString, destinationPath.asString, message: nil)\n+\n+        if editable {\n+            // For editable clones, i.e. the user is expected to directly work on them, first we create\n+            // a clone from our cache of repositories and then we replace the remote to the one originally\n+            // present in the bare repository.\n+            try system(\n+                    Git.tool, \"clone\", sourcePath.asString, destinationPath.asString, message: nil)\n+            // The default name of the remote.\n+            let origin = \"origin\"\n+            // Get the remote from original repo.\n+            let source = GitRepository(path: sourcePath)\n+            guard let remote = try source.remotes().first, remote.name == origin else {","path":"Sources/SourceControl/GitRepository.swift","position":null,"original_position":35,"commit_id":"2f1c27e2b6fe73cf52e875978a87de6916a89332","original_commit_id":"ea5e403a7d54ee15e4b96c390abe9af63782376a","user":{"login":"aciidb0mb3r","id":4136295,"avatar_url":"https://avatars.githubusercontent.com/u/4136295?v=3","gravatar_id":"","url":"https://api.github.com/users/aciidb0mb3r","html_url":"https://github.com/aciidb0mb3r","followers_url":"https://api.github.com/users/aciidb0mb3r/followers","following_url":"https://api.github.com/users/aciidb0mb3r/following{/other_user}","gists_url":"https://api.github.com/users/aciidb0mb3r/gists{/gist_id}","starred_url":"https://api.github.com/users/aciidb0mb3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aciidb0mb3r/subscriptions","organizations_url":"https://api.github.com/users/aciidb0mb3r/orgs","repos_url":"https://api.github.com/users/aciidb0mb3r/repos","events_url":"https://api.github.com/users/aciidb0mb3r/events{/privacy}","received_events_url":"https://api.github.com/users/aciidb0mb3r/received_events","type":"User","site_admin":false},"body":"made the searching change but need to decide if we should directly inject remote. Landing this for now","created_at":"2016-09-24T17:31:55Z","updated_at":"2016-09-24T17:31:55Z","html_url":"https://github.com/apple/swift-package-manager/pull/682#discussion_r80365084","pull_request_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/682","_links":{"self":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments/80365084"},"html":{"href":"https://github.com/apple/swift-package-manager/pull/682#discussion_r80365084"},"pull_request":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/682"}}},"pull_request":{"url":"https://api.github.com/repos/apple/swift-package-manager/pulls/682","id":86328579,"html_url":"https://github.com/apple/swift-package-manager/pull/682","diff_url":"https://github.com/apple/swift-package-manager/pull/682.diff","patch_url":"https://github.com/apple/swift-package-manager/pull/682.patch","issue_url":"https://api.github.com/repos/apple/swift-package-manager/issues/682","number":682,"state":"open","locked":false,"title":"[RepositoryProvider] Add editable to checkoutClone","user":{"login":"aciidb0mb3r","id":4136295,"avatar_url":"https://avatars.githubusercontent.com/u/4136295?v=3","gravatar_id":"","url":"https://api.github.com/users/aciidb0mb3r","html_url":"https://github.com/aciidb0mb3r","followers_url":"https://api.github.com/users/aciidb0mb3r/followers","following_url":"https://api.github.com/users/aciidb0mb3r/following{/other_user}","gists_url":"https://api.github.com/users/aciidb0mb3r/gists{/gist_id}","starred_url":"https://api.github.com/users/aciidb0mb3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aciidb0mb3r/subscriptions","organizations_url":"https://api.github.com/users/aciidb0mb3r/orgs","repos_url":"https://api.github.com/users/aciidb0mb3r/repos","events_url":"https://api.github.com/users/aciidb0mb3r/events{/privacy}","received_events_url":"https://api.github.com/users/aciidb0mb3r/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-22T12:34:02Z","updated_at":"2016-09-24T17:31:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"293ac199e989bbc05e926db829d03e5eb17e9f0e","assignee":{"login":"ddunbar","id":106625,"avatar_url":"https://avatars.githubusercontent.com/u/106625?v=3","gravatar_id":"","url":"https://api.github.com/users/ddunbar","html_url":"https://github.com/ddunbar","followers_url":"https://api.github.com/users/ddunbar/followers","following_url":"https://api.github.com/users/ddunbar/following{/other_user}","gists_url":"https://api.github.com/users/ddunbar/gists{/gist_id}","starred_url":"https://api.github.com/users/ddunbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddunbar/subscriptions","organizations_url":"https://api.github.com/users/ddunbar/orgs","repos_url":"https://api.github.com/users/ddunbar/repos","events_url":"https://api.github.com/users/ddunbar/events{/privacy}","received_events_url":"https://api.github.com/users/ddunbar/received_events","type":"User","site_admin":false},"assignees":[{"login":"ddunbar","id":106625,"avatar_url":"https://avatars.githubusercontent.com/u/106625?v=3","gravatar_id":"","url":"https://api.github.com/users/ddunbar","html_url":"https://github.com/ddunbar","followers_url":"https://api.github.com/users/ddunbar/followers","following_url":"https://api.github.com/users/ddunbar/following{/other_user}","gists_url":"https://api.github.com/users/ddunbar/gists{/gist_id}","starred_url":"https://api.github.com/users/ddunbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddunbar/subscriptions","organizations_url":"https://api.github.com/users/ddunbar/orgs","repos_url":"https://api.github.com/users/ddunbar/repos","events_url":"https://api.github.com/users/ddunbar/events{/privacy}","received_events_url":"https://api.github.com/users/ddunbar/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/682/commits","review_comments_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/682/comments","review_comment_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apple/swift-package-manager/issues/682/comments","statuses_url":"https://api.github.com/repos/apple/swift-package-manager/statuses/2f1c27e2b6fe73cf52e875978a87de6916a89332","head":{"label":"aciidb0mb3r:provider-edit","ref":"provider-edit","sha":"2f1c27e2b6fe73cf52e875978a87de6916a89332","user":{"login":"aciidb0mb3r","id":4136295,"avatar_url":"https://avatars.githubusercontent.com/u/4136295?v=3","gravatar_id":"","url":"https://api.github.com/users/aciidb0mb3r","html_url":"https://github.com/aciidb0mb3r","followers_url":"https://api.github.com/users/aciidb0mb3r/followers","following_url":"https://api.github.com/users/aciidb0mb3r/following{/other_user}","gists_url":"https://api.github.com/users/aciidb0mb3r/gists{/gist_id}","starred_url":"https://api.github.com/users/aciidb0mb3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aciidb0mb3r/subscriptions","organizations_url":"https://api.github.com/users/aciidb0mb3r/orgs","repos_url":"https://api.github.com/users/aciidb0mb3r/repos","events_url":"https://api.github.com/users/aciidb0mb3r/events{/privacy}","received_events_url":"https://api.github.com/users/aciidb0mb3r/received_events","type":"User","site_admin":false},"repo":{"id":47417816,"name":"swift-package-manager","full_name":"aciidb0mb3r/swift-package-manager","owner":{"login":"aciidb0mb3r","id":4136295,"avatar_url":"https://avatars.githubusercontent.com/u/4136295?v=3","gravatar_id":"","url":"https://api.github.com/users/aciidb0mb3r","html_url":"https://github.com/aciidb0mb3r","followers_url":"https://api.github.com/users/aciidb0mb3r/followers","following_url":"https://api.github.com/users/aciidb0mb3r/following{/other_user}","gists_url":"https://api.github.com/users/aciidb0mb3r/gists{/gist_id}","starred_url":"https://api.github.com/users/aciidb0mb3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aciidb0mb3r/subscriptions","organizations_url":"https://api.github.com/users/aciidb0mb3r/orgs","repos_url":"https://api.github.com/users/aciidb0mb3r/repos","events_url":"https://api.github.com/users/aciidb0mb3r/events{/privacy}","received_events_url":"https://api.github.com/users/aciidb0mb3r/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aciidb0mb3r/swift-package-manager","description":"The Package Manager for the Swift Programming Language","fork":true,"url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager","forks_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/forks","keys_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/teams","hooks_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/hooks","issue_events_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/issues/events{/number}","events_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/events","assignees_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/assignees{/user}","branches_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/branches{/branch}","tags_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/tags","blobs_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/languages","stargazers_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/stargazers","contributors_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/contributors","subscribers_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/subscribers","subscription_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/subscription","commits_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/contents/{+path}","compare_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/merges","archive_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/downloads","issues_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/issues{/number}","pulls_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/labels{/name}","releases_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/releases{/id}","deployments_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/deployments","created_at":"2015-12-04T17:05:51Z","updated_at":"2016-02-04T13:02:44Z","pushed_at":"2016-09-24T17:29:24Z","git_url":"git://github.com/aciidb0mb3r/swift-package-manager.git","ssh_url":"git@github.com:aciidb0mb3r/swift-package-manager.git","clone_url":"https://github.com/aciidb0mb3r/swift-package-manager.git","svn_url":"https://github.com/aciidb0mb3r/swift-package-manager","homepage":"","size":3274,"stargazers_count":0,"watchers_count":0,"language":"Swift","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":"apple:master","ref":"master","sha":"b9c303e9ed9c6594b87a52c103fd2ed08440083f","user":{"login":"apple","id":10639145,"avatar_url":"https://avatars.githubusercontent.com/u/10639145?v=3","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"repo":{"id":44840041,"name":"swift-package-manager","full_name":"apple/swift-package-manager","owner":{"login":"apple","id":10639145,"avatar_url":"https://avatars.githubusercontent.com/u/10639145?v=3","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apple/swift-package-manager","description":"The Package Manager for the Swift Programming Language","fork":false,"url":"https://api.github.com/repos/apple/swift-package-manager","forks_url":"https://api.github.com/repos/apple/swift-package-manager/forks","keys_url":"https://api.github.com/repos/apple/swift-package-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apple/swift-package-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apple/swift-package-manager/teams","hooks_url":"https://api.github.com/repos/apple/swift-package-manager/hooks","issue_events_url":"https://api.github.com/repos/apple/swift-package-manager/issues/events{/number}","events_url":"https://api.github.com/repos/apple/swift-package-manager/events","assignees_url":"https://api.github.com/repos/apple/swift-package-manager/assignees{/user}","branches_url":"https://api.github.com/repos/apple/swift-package-manager/branches{/branch}","tags_url":"https://api.github.com/repos/apple/swift-package-manager/tags","blobs_url":"https://api.github.com/repos/apple/swift-package-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apple/swift-package-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apple/swift-package-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/apple/swift-package-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apple/swift-package-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/apple/swift-package-manager/languages","stargazers_url":"https://api.github.com/repos/apple/swift-package-manager/stargazers","contributors_url":"https://api.github.com/repos/apple/swift-package-manager/contributors","subscribers_url":"https://api.github.com/repos/apple/swift-package-manager/subscribers","subscription_url":"https://api.github.com/repos/apple/swift-package-manager/subscription","commits_url":"https://api.github.com/repos/apple/swift-package-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/apple/swift-package-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/apple/swift-package-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/apple/swift-package-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/apple/swift-package-manager/contents/{+path}","compare_url":"https://api.github.com/repos/apple/swift-package-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apple/swift-package-manager/merges","archive_url":"https://api.github.com/repos/apple/swift-package-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apple/swift-package-manager/downloads","issues_url":"https://api.github.com/repos/apple/swift-package-manager/issues{/number}","pulls_url":"https://api.github.com/repos/apple/swift-package-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/apple/swift-package-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/apple/swift-package-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apple/swift-package-manager/labels{/name}","releases_url":"https://api.github.com/repos/apple/swift-package-manager/releases{/id}","deployments_url":"https://api.github.com/repos/apple/swift-package-manager/deployments","created_at":"2015-10-23T21:41:12Z","updated_at":"2016-09-24T14:14:49Z","pushed_at":"2016-09-24T17:29:24Z","git_url":"git://github.com/apple/swift-package-manager.git","ssh_url":"git@github.com:apple/swift-package-manager.git","clone_url":"https://github.com/apple/swift-package-manager.git","svn_url":"https://github.com/apple/swift-package-manager","homepage":"","size":4263,"stargazers_count":4724,"watchers_count":4724,"language":"Swift","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":434,"mirror_url":null,"open_issues_count":17,"forks":434,"open_issues":17,"watchers":4724,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/682"},"html":{"href":"https://github.com/apple/swift-package-manager/pull/682"},"issue":{"href":"https://api.github.com/repos/apple/swift-package-manager/issues/682"},"comments":{"href":"https://api.github.com/repos/apple/swift-package-manager/issues/682/comments"},"review_comments":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/682/comments"},"review_comment":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/682/commits"},"statuses":{"href":"https://api.github.com/repos/apple/swift-package-manager/statuses/2f1c27e2b6fe73cf52e875978a87de6916a89332"}}}}
{"actor":{"display_login":"aciidb0mb3r"}}