mirror of
https://github.com/gosticks/SwiftGit2.git
synced 2025-10-16 11:55:34 +00:00
[Lint] Clean up indentation
This commit is contained in:
parent
31a755dd49
commit
0a1a5d4174
@ -59,8 +59,8 @@ public class CommitIterator: IteratorProtocol, Sequence {
|
||||
var unsafeCommit: OpaquePointer? = nil
|
||||
let lookupGitResult = git_commit_lookup(&unsafeCommit, repo.pointer, &oid)
|
||||
guard lookupGitResult == GIT_OK.rawValue,
|
||||
let unwrapCommit = unsafeCommit else {
|
||||
return Result.failure(NSError(gitError: lookupGitResult, pointOfFailure: "git_commit_lookup"))
|
||||
let unwrapCommit = unsafeCommit else {
|
||||
return Result.failure(NSError(gitError: lookupGitResult, pointOfFailure: "git_commit_lookup"))
|
||||
}
|
||||
let result: Element = Result.success(Commit(unwrapCommit))
|
||||
git_commit_free(unsafeCommit)
|
||||
|
||||
@ -151,24 +151,24 @@ public final class Repository {
|
||||
public class func clone(from remoteURL: URL, to localURL: URL, localClone: Bool = false, bare: Bool = false,
|
||||
credentials: Credentials = .default, checkoutStrategy: CheckoutStrategy = .Safe,
|
||||
checkoutProgress: CheckoutProgressBlock? = nil) -> Result<Repository, NSError> {
|
||||
var options = cloneOptions(
|
||||
bare: bare,
|
||||
localClone: localClone,
|
||||
fetchOptions: fetchOptions(credentials: credentials),
|
||||
checkoutOptions: checkoutOptions(strategy: checkoutStrategy, progress: checkoutProgress))
|
||||
var options = cloneOptions(
|
||||
bare: bare,
|
||||
localClone: localClone,
|
||||
fetchOptions: fetchOptions(credentials: credentials),
|
||||
checkoutOptions: checkoutOptions(strategy: checkoutStrategy, progress: checkoutProgress))
|
||||
|
||||
var pointer: OpaquePointer? = nil
|
||||
let remoteURLString = (remoteURL as NSURL).isFileReferenceURL() ? remoteURL.path : remoteURL.absoluteString
|
||||
let result = localURL.withUnsafeFileSystemRepresentation { localPath in
|
||||
git_clone(&pointer, remoteURLString, localPath, &options)
|
||||
}
|
||||
var pointer: OpaquePointer? = nil
|
||||
let remoteURLString = (remoteURL as NSURL).isFileReferenceURL() ? remoteURL.path : remoteURL.absoluteString
|
||||
let result = localURL.withUnsafeFileSystemRepresentation { localPath in
|
||||
git_clone(&pointer, remoteURLString, localPath, &options)
|
||||
}
|
||||
|
||||
guard result == GIT_OK.rawValue else {
|
||||
return Result.failure(NSError(gitError: result, pointOfFailure: "git_clone"))
|
||||
}
|
||||
guard result == GIT_OK.rawValue else {
|
||||
return Result.failure(NSError(gitError: result, pointOfFailure: "git_clone"))
|
||||
}
|
||||
|
||||
let repository = Repository(pointer!)
|
||||
return Result.success(repository)
|
||||
let repository = Repository(pointer!)
|
||||
return Result.success(repository)
|
||||
}
|
||||
|
||||
// MARK: - Initializers
|
||||
|
||||
Loading…
Reference in New Issue
Block a user