mirror of
https://github.com/gosticks/SwiftGit2.git
synced 2025-10-16 11:55:34 +00:00
Updated to Swift 5.2
This commit is contained in:
parent
c5cbf4cc17
commit
5ec4722a20
@ -1,7 +1,7 @@
|
|||||||
language: objective-c
|
language: objective-c
|
||||||
|
|
||||||
os: osx
|
os: osx
|
||||||
osx_image: xcode10.2
|
osx_image: xcode11.4
|
||||||
|
|
||||||
sudo: false # Enable container-based builds
|
sudo: false # Enable container-based builds
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@ -94,7 +94,7 @@ public struct Diff {
|
|||||||
}
|
}
|
||||||
public let rawValue: UInt32
|
public let rawValue: UInt32
|
||||||
|
|
||||||
public static let binary = Flags(rawValue: 0)
|
public static let binary = Flags([])
|
||||||
public static let notBinary = Flags(rawValue: 1 << 0)
|
public static let notBinary = Flags(rawValue: 1 << 0)
|
||||||
public static let validId = Flags(rawValue: 1 << 1)
|
public static let validId = Flags(rawValue: 1 << 1)
|
||||||
public static let exists = Flags(rawValue: 1 << 2)
|
public static let exists = Flags(rawValue: 1 << 2)
|
||||||
|
|||||||
@ -588,9 +588,10 @@ public final class Repository {
|
|||||||
|
|
||||||
/// Stage the file(s) under the specified path.
|
/// Stage the file(s) under the specified path.
|
||||||
public func add(path: String) -> Result<(), NSError> {
|
public func add(path: String) -> Result<(), NSError> {
|
||||||
let dir = path
|
var dirPointer = UnsafeMutablePointer<Int8>(mutating: (path as NSString).utf8String)
|
||||||
var dirPointer = UnsafeMutablePointer<Int8>(mutating: (dir as NSString).utf8String)
|
var paths = withExtendedLifetime(&dirPointer) {
|
||||||
var paths = git_strarray(strings: &dirPointer, count: 1)
|
git_strarray(strings: $0, count: 1)
|
||||||
|
}
|
||||||
return unsafeIndex().flatMap { index in
|
return unsafeIndex().flatMap { index in
|
||||||
defer { git_index_free(index) }
|
defer { git_index_free(index) }
|
||||||
let addResult = git_index_add_all(index, &paths, 0, nil, nil)
|
let addResult = git_index_add_all(index, &paths, 0, nil, nil)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user