Skip to content

Commit 4864cc4

Browse files
authored
Merge pull request SwiftGit2#82 from SwiftGit2/swift3-readme
Update README.md for Swift 3
2 parents 36f934d + 2e7a0ce commit 4864cc4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
# SwiftGit2 [![Build Status](https://travis-ci.org/SwiftGit2/SwiftGit2.svg)](https://travis-ci.org/SwiftGit2/SwiftGit2)
1+
# SwiftGit2
2+
[![Build Status](https://travis-ci.org/SwiftGit2/SwiftGit2.svg)](https://travis-ci.org/SwiftGit2/SwiftGit2) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](#carthage) [![GitHub release](https://img.shields.io/github/release/ReactiveCocoa/ReactiveSwift.svg)](https://github.com/ReactiveCocoa/ReactiveSwift/releases) ![Swift 3.0.x](https://img.shields.io/badge/Swift-3.0.x-orange.svg)
3+
24
Swift bindings to [libgit2](https://github.com/libgit2/libgit2).
35

46
```swift
57
let URL: NSURL = ...
6-
let repo = Repository.atURL(URL)
8+
let repo = Repository.at(URL)
79
if let repo = repo.value {
810
let latestCommit: Result<Commit, NSError> = repo
911
.HEAD()
10-
.flatMap { repo.commitWithOID($0.oid) }
12+
.flatMap { repo.commit($0.oid) }
1113
if let commit = latestCommit.value {
1214
print("Latest Commit: \(commit.message) by \(commit.author.name)")
1315
} else {
@@ -18,8 +20,6 @@ if let repo = repo.value {
1820
}
1921
```
2022

21-
SwiftGit2 requires Xcode 6.3 or later.
22-
2323
## Design
2424
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:
2525

0 commit comments

Comments
 (0)