@@ -79,22 +79,13 @@ public class GitRepositoryProvider: RepositoryProvider {
79
79
repository: RepositorySpecifier ,
80
80
at sourcePath: AbsolutePath ,
81
81
to destinationPath: AbsolutePath ,
82
- editable: Bool
82
+ editable: Bool = false
83
83
) throws {
84
84
// For editable clones, i.e. the user is expected to directly work on them, first we create
85
85
// a clone from our cache of repositories and then we replace the remote to the one originally
86
86
// present in the bare repository.
87
- try Process . checkNonZeroExit ( args: Git . tool, " clone " , sourcePath. pathString, destinationPath. pathString)
88
- // The default name of the remote.
89
- let origin = " origin "
90
- // In destination repo remove the remote which will be pointing to the source repo.
91
- let clone = GitRepository ( path: destinationPath)
92
- // Set the original remote to the new clone.
93
- try clone. setURL ( remote: origin, url: repository. url)
94
- // FIXME: This is unfortunate that we have to fetch to update remote's data.
95
- try clone. fetch ( )
96
- // try Process.checkNonZeroExit(args: Git.tool, "clone", "--reference", sourcePath.pathString,
97
- // repository.url, "--dissociate", destinationPath.pathString)
87
+ try Process . checkNonZeroExit ( args: Git . tool, " clone " , " --reference " , sourcePath. pathString,
88
+ repository. url, " --dissociate " , destinationPath. pathString)
98
89
}
99
90
100
91
public func checkoutExists( at path: AbsolutePath ) throws -> Bool {
0 commit comments