aboutsummaryrefslogtreecommitdiff
path: root/internal/testgit/repo_commit_graph_write.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-06 08:05:51 +0800
committerGravatar Runxi Yu2026-03-06 10:00:35 +0800
commite15054a4f93fc54806e84aa7036e60168e78e823 (patch)
treeb576dcb1d3368324e7ca73ca0fe79dd8865c5524 /internal/testgit/repo_commit_graph_write.go
parentinternal/intconv: Add Uint32ToUint8 (diff)
signatureNo signature
format/commitgraph: Add initial commit-graph support
Diffstat (limited to 'internal/testgit/repo_commit_graph_write.go')
-rw-r--r--internal/testgit/repo_commit_graph_write.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/internal/testgit/repo_commit_graph_write.go b/internal/testgit/repo_commit_graph_write.go
new file mode 100644
index 00000000..13221f87
--- /dev/null
+++ b/internal/testgit/repo_commit_graph_write.go
@@ -0,0 +1,13 @@
+package testgit
+
+import "testing"
+
+// CommitGraphWrite runs "git commit-graph write" with args in the repository.
+func (testRepo *TestRepo) CommitGraphWrite(tb testing.TB, args ...string) {
+ tb.Helper()
+
+ cmdArgs := make([]string, 0, len(args)+3)
+ cmdArgs = append(cmdArgs, "commit-graph", "write")
+ cmdArgs = append(cmdArgs, args...)
+ _ = testRepo.Run(tb, cmdArgs...)
+}