[Lint] Clean up indentation

This commit is contained in:
Matt Rubin 2018-09-21 02:06:50 -04:00
parent 31a755dd49
commit 0a1a5d4174
2 changed files with 17 additions and 17 deletions

View File

@ -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)

View File

@ -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