@@ -105,30 +105,26 @@ public async Task<ViewerRepositoriesModel> ReadViewerRepositories(HostAddress ad
105105 /// <inheritdoc/>
106106 public async Task CloneRepository (
107107 string cloneUrl ,
108- string repositoryName ,
109108 string repositoryPath ,
110109 object progress = null )
111110 {
112111 Guard . ArgumentNotEmptyString ( cloneUrl , nameof ( cloneUrl ) ) ;
113- Guard . ArgumentNotEmptyString ( repositoryName , nameof ( repositoryName ) ) ;
114112 Guard . ArgumentNotEmptyString ( repositoryPath , nameof ( repositoryPath ) ) ;
115113
116- string path = Path . Combine ( repositoryPath , repositoryName ) ;
117-
118114 // Switch to a thread pool thread for IO then back to the main thread to call
119115 // vsGitServices.Clone() as this must be called on the main thread.
120116 await ThreadingHelper . SwitchToPoolThreadAsync ( ) ;
121- operatingSystem . Directory . CreateDirectory ( path ) ;
117+ operatingSystem . Directory . CreateDirectory ( repositoryPath ) ;
122118 await ThreadingHelper . SwitchToMainThreadAsync ( ) ;
123119
124120 try
125121 {
126- await vsGitServices . Clone ( cloneUrl , path , true , progress ) ;
122+ await vsGitServices . Clone ( cloneUrl , repositoryPath , true , progress ) ;
127123 await usageTracker . IncrementCounter ( x => x . NumberOfClones ) ;
128124 }
129125 catch ( Exception ex )
130126 {
131- log . Error ( ex , "Could not clone {CloneUrl} to {Path}" , cloneUrl , path ) ;
127+ log . Error ( ex , "Could not clone {CloneUrl} to {Path}" , cloneUrl , repositoryPath ) ;
132128 throw ;
133129 }
134130 }
0 commit comments