aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-02-21 05:30:17 +0800
committerGravatar Runxi Yu2026-02-21 05:30:17 +0800
commitfe51d94ec1ae701737c3f6ece74904bdf9c0f17b (patch)
treeac1d20cf783be1856b95940b43c0eed81442828a /internal
parentobjectstore/loose: Move test helpers to their own file (diff)
signatureNo signature
testgit: Add git repack
Diffstat (limited to 'internal')
-rw-r--r--internal/testgit/repo_repack.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/testgit/repo_repack.go b/internal/testgit/repo_repack.go
new file mode 100644
index 00000000..29fa8a4f
--- /dev/null
+++ b/internal/testgit/repo_repack.go
@@ -0,0 +1,12 @@
+package testgit
+
+import "testing"
+
+// Repack runs "git repack" with args in the repository.
+func (testRepo *TestRepo) Repack(tb testing.TB, args ...string) {
+ tb.Helper()
+ cmdArgs := make([]string, 0, len(args)+1)
+ cmdArgs = append(cmdArgs, "repack")
+ cmdArgs = append(cmdArgs, args...)
+ _ = testRepo.Run(tb, cmdArgs...)
+}