aboutsummaryrefslogtreecommitdiff
path: root/internal/testgit/repo_make_single_file_tree.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-02-20 22:59:14 +0800
committerGravatar Runxi Yu2026-02-20 22:59:14 +0800
commitd88c8e20aebd9408df0306e97dffc2896950342d (patch)
tree8e137f37fdd9ea673bd622a2b9c9873cd89278fb /internal/testgit/repo_make_single_file_tree.go
parentobjectid: Use _test package for tests (diff)
signatureNo signature
*: Replace repo with testRepo
Diffstat (limited to 'internal/testgit/repo_make_single_file_tree.go')
-rw-r--r--internal/testgit/repo_make_single_file_tree.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/testgit/repo_make_single_file_tree.go b/internal/testgit/repo_make_single_file_tree.go
index a0ccce9b..7c53c658 100644
--- a/internal/testgit/repo_make_single_file_tree.go
+++ b/internal/testgit/repo_make_single_file_tree.go
@@ -8,10 +8,10 @@ import (
)
// MakeSingleFileTree writes one blob and one tree entry for it and returns (blobID, treeID).
-func (repo *TestRepo) MakeSingleFileTree(tb testing.TB, fileName string, fileContent []byte) (objectid.ObjectID, objectid.ObjectID) {
+func (testRepo *TestRepo) MakeSingleFileTree(tb testing.TB, fileName string, fileContent []byte) (objectid.ObjectID, objectid.ObjectID) {
tb.Helper()
- blobID := repo.HashObject(tb, "blob", fileContent)
+ blobID := testRepo.HashObject(tb, "blob", fileContent)
treeInput := fmt.Sprintf("100644 blob %s\t%s\n", blobID.String(), fileName)
- treeID := repo.Mktree(tb, treeInput)
+ treeID := testRepo.Mktree(tb, treeInput)
return blobID, treeID
}