blob: a329ee8a7f0d9085110f436368f6a4ff970ff219 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
package testgit
import (
"testing"
"codeberg.org/lindenii/furgit/oid"
)
// MakeCommit creates a commit over a single-file tree and returns (blobID, treeID, commitID).
func (repo *TestRepo) MakeCommit(tb testing.TB, message string) (oid.ObjectID, oid.ObjectID, oid.ObjectID) {
tb.Helper()
blobID, treeID := repo.MakeSingleFileTree(tb, "file.txt", []byte("commit-body\n"))
commitID := repo.CommitTree(tb, treeID, message)
return blobID, treeID, commitID
}
|