blob: 356193340351303bed7e38df665d442c05495cce (
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/objectid"
)
// MakeCommit creates a commit over a single-file tree and returns (blobID, treeID, commitID).
func (repo *TestRepo) MakeCommit(tb testing.TB, message string) (objectid.ObjectID, objectid.ObjectID, objectid.ObjectID) {
tb.Helper()
blobID, treeID := repo.MakeSingleFileTree(tb, "file.txt", []byte("commit-body\n"))
commitID := repo.CommitTree(tb, treeID, message)
return blobID, treeID, commitID
}
|