aboutsummaryrefslogtreecommitdiff
path: root/object/tree_helpers_test.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 /object/tree_helpers_test.go
parentobjectid: Use _test package for tests (diff)
signatureNo signature
*: Replace repo with testRepo
Diffstat (limited to 'object/tree_helpers_test.go')
-rw-r--r--object/tree_helpers_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/object/tree_helpers_test.go b/object/tree_helpers_test.go
index ce7160d6..539d7542 100644
--- a/object/tree_helpers_test.go
+++ b/object/tree_helpers_test.go
@@ -61,20 +61,20 @@ func gitLsTreeNames(out []byte) [][]byte {
return names
}
-func adversarialRootEntries(t *testing.T, repo *testgit.TestRepo) []object.TreeEntry {
+func adversarialRootEntries(t *testing.T, testRepo *testgit.TestRepo) []object.TreeEntry {
t.Helper()
- blobA := repo.HashObject(t, "blob", []byte("blob-A\n"))
- blobB := repo.HashObject(t, "blob", []byte("blob-B\n"))
- blobC := repo.HashObject(t, "blob", []byte("blob-C\n"))
+ blobA := testRepo.HashObject(t, "blob", []byte("blob-A\n"))
+ blobB := testRepo.HashObject(t, "blob", []byte("blob-B\n"))
+ blobC := testRepo.HashObject(t, "blob", []byte("blob-C\n"))
- subDirA := repo.Mktree(t,
+ subDirA := testRepo.Mktree(t,
fmt.Sprintf("100644 blob %s\tnested-a.txt\n100755 blob %s\trun-a.sh\n", blobA.String(), blobB.String()))
- subDirB := repo.Mktree(t,
+ subDirB := testRepo.Mktree(t,
fmt.Sprintf("100644 blob %s\tnested-b.txt\n100644 blob %s\tz-last\n", blobB.String(), blobC.String()))
- subDirC := repo.Mktree(t,
+ subDirC := testRepo.Mktree(t,
fmt.Sprintf("120000 blob %s\tlink-c\n100644 blob %s\tchild\n", blobC.String(), blobA.String()))
- subDirD := repo.Mktree(t,
+ subDirD := testRepo.Mktree(t,
fmt.Sprintf("100644 blob %s\tleaf\n", blobA.String()))
return []object.TreeEntry{