diff options
| author | 2026-02-21 05:30:17 +0800 | |
|---|---|---|
| committer | 2026-02-21 05:30:17 +0800 | |
| commit | fe51d94ec1ae701737c3f6ece74904bdf9c0f17b (patch) | |
| tree | ac1d20cf783be1856b95940b43c0eed81442828a /internal/testgit | |
| parent | objectstore/loose: Move test helpers to their own file (diff) | |
| signature | No signature | |
testgit: Add git repack
Diffstat (limited to 'internal/testgit')
| -rw-r--r-- | internal/testgit/repo_repack.go | 12 |
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...) +} |
