From fe51d94ec1ae701737c3f6ece74904bdf9c0f17b Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 21 Feb 2026 05:30:17 +0800 Subject: testgit: Add git repack --- internal/testgit/repo_repack.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 internal/testgit/repo_repack.go (limited to 'internal') 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...) +} -- cgit v1.3.1-10-gc9f91