Skip to content
This repository was archived by the owner on Oct 17, 2021. It is now read-only.

Commit c7b7c64

Browse files
committed
Rename commit method to include create prefix
1 parent 5f29409 commit c7b7c64

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/Git/Repository.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public final class Repository {
193193
}
194194

195195
@discardableResult
196-
public func commit(message: String, author: Signature? = nil, committer: Signature? = nil) throws -> Commit {
196+
public func createCommit(message: String, author: Signature? = nil, committer: Signature? = nil) throws -> Commit {
197197
let tree = try lookup(try Object.ID { oid in
198198
try attempt { git_index_write_tree(oid, index?.pointer) }
199199
}) as Tree?

Tests/GitTests/GitTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ final class GitTests: XCTestCase {
8484
try repository.add(paths: ["hello.txt"])
8585

8686
let signature = try Signature(name: "Mona Lisa Octocat", email: "mona@github.com")
87-
let commit = try repository.commit(message: "Initial commit", author: signature, committer: signature)
87+
let commit = try repository.createCommit(message: "Initial commit", author: signature, committer: signature)
8888

8989
XCTAssertEqual(repository.head?.commit, commit)
9090
XCTAssertEqual(commit.message, "Initial commit")

0 commit comments

Comments
 (0)