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