Skip to content

Commit a6e3cbd

Browse files
committed
removed unnecessary lock
1 parent b27ed01 commit a6e3cbd

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

Sources/SourceControl/RepositoryManager.swift

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -304,23 +304,19 @@ public class RepositoryManager {
304304
let lock = FileLock(name: handle.repository.basename, cachePath: self.path)
305305
// FIXME: Workaround for `FileLock` only working on `LocaFileSystem`
306306
if localFileSystem.exists(self.path) {
307-
try lock.withLock {
308-
try lock.withLock {
309-
try provider.cloneCheckout(
310-
repository: handle.repository,
311-
at: path.appending(handle.subpath),
312-
to: destinationPath,
313-
editable: editable)
314-
}
315-
}
316-
} else {
317307
try lock.withLock {
318308
try provider.cloneCheckout(
319309
repository: handle.repository,
320310
at: path.appending(handle.subpath),
321311
to: destinationPath,
322312
editable: editable)
323313
}
314+
} else {
315+
try provider.cloneCheckout(
316+
repository: handle.repository,
317+
at: path.appending(handle.subpath),
318+
to: destinationPath,
319+
editable: editable)
324320
}
325321
}
326322

0 commit comments

Comments
 (0)