You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Swift bindings to [libgit2](https://github.com/libgit2/libgit2).
3
5
4
6
```swift
5
7
let URL: NSURL =...
6
-
let repo = Repository.atURL(URL)
8
+
let repo = Repository.at(URL)
7
9
iflet repo = repo.value {
8
10
let latestCommit: Result<Commit, NSError> = repo
9
11
.HEAD()
10
-
.flatMap { repo.commitWithOID($0.oid) }
12
+
.flatMap { repo.commit($0.oid) }
11
13
iflet commit = latestCommit.value {
12
14
print("Latest Commit: \(commit.message) by \(commit.author.name)")
13
15
} else {
@@ -18,8 +20,6 @@ if let repo = repo.value {
18
20
}
19
21
```
20
22
21
-
SwiftGit2 requires Xcode 6.3 or later.
22
-
23
23
## Design
24
24
SwiftGit2 uses value objects wherever possible. That means using Swift’s `struct`s and `enum`s without holding references to libgit2 objects. This has a number of advantages:
0 commit comments