From b87b66f11a521faf55bccd075eb4989388fc7a1c Mon Sep 17 00:00:00 2001 From: "PondokiOS (Muhammmad Muizzsuddin)" Date: Sun, 14 Jul 2019 10:10:26 +0700 Subject: [PATCH] Change libgit2 to Clibgit2 --- .gitignore | 3 +++ SwiftGit2/CheckoutStrategy.swift | 2 +- SwiftGit2/CommitIterator.swift | 2 +- SwiftGit2/Credentials.swift | 2 +- SwiftGit2/Diffs.swift | 2 +- SwiftGit2/Errors.swift | 2 +- SwiftGit2/Libgit2.swift | 2 +- SwiftGit2/OID.swift | 2 +- SwiftGit2/Objects.swift | 2 +- SwiftGit2/Pointers.swift | 2 +- SwiftGit2/References.swift | 2 +- SwiftGit2/Remotes.swift | 2 +- SwiftGit2/Repository.swift | 2 +- SwiftGit2Tests/ObjectsSpec.swift | 2 +- SwiftGit2Tests/ReferencesSpec.swift | 2 +- SwiftGit2Tests/RemotesSpec.swift | 2 +- libgit2/module.modulemap | 2 +- 17 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index c7f19ed..1d0630f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +.vscode/ +.build/ + # Xcode # build/ diff --git a/SwiftGit2/CheckoutStrategy.swift b/SwiftGit2/CheckoutStrategy.swift index b807677..70c4133 100644 --- a/SwiftGit2/CheckoutStrategy.swift +++ b/SwiftGit2/CheckoutStrategy.swift @@ -6,7 +6,7 @@ // Copyright (c) 2015 GitHub, Inc. All rights reserved. // -import libgit2 +import Clibgit2 /// The flags defining how a checkout should be performed. /// More detail is available in the libgit2 documentation for `git_checkout_strategy_t`. diff --git a/SwiftGit2/CommitIterator.swift b/SwiftGit2/CommitIterator.swift index 4f63ecf..01ae190 100644 --- a/SwiftGit2/CommitIterator.swift +++ b/SwiftGit2/CommitIterator.swift @@ -4,7 +4,7 @@ // import Foundation -import libgit2 +import Clibgit2 public class CommitIterator: IteratorProtocol, Sequence { public typealias Iterator = CommitIterator diff --git a/SwiftGit2/Credentials.swift b/SwiftGit2/Credentials.swift index 2ac5884..d5d89f1 100644 --- a/SwiftGit2/Credentials.swift +++ b/SwiftGit2/Credentials.swift @@ -6,7 +6,7 @@ // Copyright © 2016 GitHub, Inc. All rights reserved. // -import libgit2 +import Clibgit2 private class Wrapper { let value: T diff --git a/SwiftGit2/Diffs.swift b/SwiftGit2/Diffs.swift index 7b00bdf..a1d64b7 100644 --- a/SwiftGit2/Diffs.swift +++ b/SwiftGit2/Diffs.swift @@ -6,7 +6,7 @@ // Copyright © 2017 GitHub, Inc. All rights reserved. // -import libgit2 +import Clibgit2 public struct StatusEntry { public var status: Diff.Status diff --git a/SwiftGit2/Errors.swift b/SwiftGit2/Errors.swift index 933c730..e854497 100644 --- a/SwiftGit2/Errors.swift +++ b/SwiftGit2/Errors.swift @@ -1,5 +1,5 @@ import Foundation -import libgit2 +import Clibgit2 public let libGit2ErrorDomain = "org.libgit2.libgit2" diff --git a/SwiftGit2/Libgit2.swift b/SwiftGit2/Libgit2.swift index d544b32..905de9f 100644 --- a/SwiftGit2/Libgit2.swift +++ b/SwiftGit2/Libgit2.swift @@ -6,7 +6,7 @@ // Copyright (c) 2015 GitHub, Inc. All rights reserved. // -import libgit2 +import Clibgit2 extension git_strarray { func filter(_ isIncluded: (String) -> Bool) -> [String] { diff --git a/SwiftGit2/OID.swift b/SwiftGit2/OID.swift index e3a3e01..beb3f63 100644 --- a/SwiftGit2/OID.swift +++ b/SwiftGit2/OID.swift @@ -6,7 +6,7 @@ // Copyright (c) 2014 GitHub, Inc. All rights reserved. // -import libgit2 +import Clibgit2 /// An identifier for a Git object. public struct OID { diff --git a/SwiftGit2/Objects.swift b/SwiftGit2/Objects.swift index 4b2c037..0e4be19 100644 --- a/SwiftGit2/Objects.swift +++ b/SwiftGit2/Objects.swift @@ -7,7 +7,7 @@ // import Foundation -import libgit2 +import Clibgit2 /// A git object. public protocol ObjectType { diff --git a/SwiftGit2/Pointers.swift b/SwiftGit2/Pointers.swift index 0aa1c56..800ba6a 100644 --- a/SwiftGit2/Pointers.swift +++ b/SwiftGit2/Pointers.swift @@ -6,7 +6,7 @@ // Copyright (c) 2014 GitHub, Inc. All rights reserved. // -import libgit2 +import Clibgit2 /// A pointer to a git object. public protocol PointerType: Hashable { diff --git a/SwiftGit2/References.swift b/SwiftGit2/References.swift index 5ceb3dc..44d49f9 100644 --- a/SwiftGit2/References.swift +++ b/SwiftGit2/References.swift @@ -6,7 +6,7 @@ // Copyright (c) 2015 GitHub, Inc. All rights reserved. // -import libgit2 +import Clibgit2 /// A reference to a git object. public protocol ReferenceType { diff --git a/SwiftGit2/Remotes.swift b/SwiftGit2/Remotes.swift index 78ea261..0f5c026 100644 --- a/SwiftGit2/Remotes.swift +++ b/SwiftGit2/Remotes.swift @@ -6,7 +6,7 @@ // Copyright (c) 2015 GitHub, Inc. All rights reserved. // -import libgit2 +import Clibgit2 /// A remote in a git repository. public struct Remote: Hashable { diff --git a/SwiftGit2/Repository.swift b/SwiftGit2/Repository.swift index 11feb25..eda25f1 100644 --- a/SwiftGit2/Repository.swift +++ b/SwiftGit2/Repository.swift @@ -7,7 +7,7 @@ // import Foundation -import libgit2 +import Clibgit2 public typealias CheckoutProgressBlock = (String?, Int, Int) -> Void diff --git a/SwiftGit2Tests/ObjectsSpec.swift b/SwiftGit2Tests/ObjectsSpec.swift index 7c3f73b..b2d81d1 100644 --- a/SwiftGit2Tests/ObjectsSpec.swift +++ b/SwiftGit2Tests/ObjectsSpec.swift @@ -9,7 +9,7 @@ import SwiftGit2 import Nimble import Quick -import libgit2 +import Clibgit2 private extension Repository { func withGitObject(_ oid: OID, transform: (OpaquePointer) -> T) -> T { diff --git a/SwiftGit2Tests/ReferencesSpec.swift b/SwiftGit2Tests/ReferencesSpec.swift index 43a470d..311343a 100644 --- a/SwiftGit2Tests/ReferencesSpec.swift +++ b/SwiftGit2Tests/ReferencesSpec.swift @@ -9,7 +9,7 @@ import SwiftGit2 import Nimble import Quick -import libgit2 +import Clibgit2 private extension Repository { func withGitReference(named name: String, transform: (OpaquePointer) -> T) -> T { diff --git a/SwiftGit2Tests/RemotesSpec.swift b/SwiftGit2Tests/RemotesSpec.swift index 423ce56..0f2d66b 100644 --- a/SwiftGit2Tests/RemotesSpec.swift +++ b/SwiftGit2Tests/RemotesSpec.swift @@ -9,7 +9,7 @@ import SwiftGit2 import Nimble import Quick -import libgit2 +import Clibgit2 private extension Repository { func withGitRemote(named name: String, transform: (OpaquePointer) -> T) -> T { diff --git a/libgit2/module.modulemap b/libgit2/module.modulemap index 2ec118c..fe5729d 100644 --- a/libgit2/module.modulemap +++ b/libgit2/module.modulemap @@ -1,4 +1,4 @@ -module libgit2 { +module Clibgit2 { umbrella header "git2.h" export *