shithub: furgit

Download patch

ref: fe51d94ec1ae701737c3f6ece74904bdf9c0f17b
parent: bf504c5af1559dc2f4149a7e9359374345683724
author: Runxi Yu <me@runxiyu.org>
date: Sat Feb 21 00:30:17 EST 2026

testgit: Add git repack

--- /dev/null
+++ b/internal/testgit/repo_repack.go
@@ -1,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...)
+}
--