@@ -13,9 +13,9 @@ public struct GitCheckout {
13
13
14
14
public init ( ) { }
15
15
16
- typealias ProgressCallback = ( CheckoutProgress ) -> Void
16
+ public typealias ProgressCallback = ( CheckoutProgress ) -> Void
17
17
18
- func getCheckoutArgs( progressCallback: ProgressCallback ? ) -> [ String ] {
18
+ public func getCheckoutArgs( progressCallback: ProgressCallback ? ) -> [ String ] {
19
19
var args = gitNetworkArguments
20
20
21
21
if let callback = progressCallback {
@@ -27,7 +27,7 @@ public struct GitCheckout {
27
27
return args
28
28
}
29
29
30
- func getBranchCheckoutArgs( branch: GitBranch ,
30
+ public func getBranchCheckoutArgs( branch: GitBranch ,
31
31
enableRecurseSubmodulesFlag: Bool = false ) -> [ String ] {
32
32
var baseArgs : [ String ] = [ ]
33
33
@@ -64,7 +64,7 @@ public struct GitCheckout {
64
64
}
65
65
}
66
66
67
- func getCheckoutOpts( directoryURL: URL ,
67
+ public func getCheckoutOpts( directoryURL: URL ,
68
68
account: IGitAccount ? ,
69
69
title: String ,
70
70
target: String ,
@@ -128,7 +128,8 @@ public struct GitCheckout {
128
128
///
129
129
/// - Warning:
130
130
/// Ensure that the specified `directoryURL` exists and is a valid Git repository directory.
131
- func checkoutBranch( directoryURL: URL ,
131
+ @discardableResult
132
+ public func checkoutBranch( directoryURL: URL ,
132
133
account: IGitAccount ? ,
133
134
branch: GitBranch ,
134
135
progressCallback: ProgressCallback ? ) throws -> Bool {
@@ -152,10 +153,10 @@ public struct GitCheckout {
152
153
return true
153
154
}
154
155
155
- func checkoutCommit( directoryURL: URL ,
156
- account: IGitAccount ? ,
157
- commit: Commit ,
158
- progressCallback: ProgressCallback ? ) async throws -> Bool {
156
+ public func checkoutCommit( directoryURL: URL ,
157
+ account: IGitAccount ? ,
158
+ commit: Commit ,
159
+ progressCallback: ProgressCallback ? ) async throws -> Bool {
159
160
let opts = try getCheckoutOpts (
160
161
directoryURL: directoryURL,
161
162
account: account,
@@ -240,9 +241,9 @@ public struct GitCheckout {
240
241
///
241
242
/// - Warning:
242
243
/// Ensure that the specified `directoryURL` exists and is a valid Git repository directory.
243
- func checkoutConflictedFile( directoryURL: URL ,
244
- file: WorkingDirectoryFileChange ,
245
- resolution: ManualConflictResolution ) throws {
244
+ public func checkoutConflictedFile( directoryURL: URL ,
245
+ file: WorkingDirectoryFileChange ,
246
+ resolution: ManualConflictResolution ) throws {
246
247
let args = [
247
248
" checkout " ,
248
249
" -- \( resolution. rawValue) " ,
0 commit comments