aboutsummaryrefslogtreecommitdiff
path: root/internal/testgit/repo_commit_tree.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-04-02 06:23:30 +0000
committerGravatar Runxi Yu2026-04-02 06:28:39 +0000
commita041d523de389b65b98a5373a8034041db2a8d83 (patch)
tree7b423dc735f463be616045f2c3c2095a7737aca7 /internal/testgit/repo_commit_tree.go
parentresearch: Add dynamic pack resources (diff)
signatureNo signature
*: Remove
Diffstat (limited to 'internal/testgit/repo_commit_tree.go')
-rw-r--r--internal/testgit/repo_commit_tree.go29
1 files changed, 0 insertions, 29 deletions
diff --git a/internal/testgit/repo_commit_tree.go b/internal/testgit/repo_commit_tree.go
deleted file mode 100644
index 3a5a75ac..00000000
--- a/internal/testgit/repo_commit_tree.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package testgit
-
-import (
- "testing"
-
- objectid "codeberg.org/lindenii/furgit/object/id"
-)
-
-// CommitTree creates a commit from a tree and message, optionally with parents.
-func (testRepo *TestRepo) CommitTree(tb testing.TB, tree objectid.ObjectID, message string, parents ...objectid.ObjectID) objectid.ObjectID {
- tb.Helper()
-
- args := make([]string, 0, 2+2*len(parents)+2)
-
- args = append(args, "commit-tree", tree.String())
- for _, p := range parents {
- args = append(args, "-p", p.String())
- }
-
- args = append(args, "-m", message)
- hex := testRepo.Run(tb, args...)
-
- id, err := objectid.ParseHex(testRepo.algo, hex)
- if err != nil {
- tb.Fatalf("parse commit-tree output %q: %v", hex, err)
- }
-
- return id
-}