MCPcopy Create free account
hub / github.com/cloudflare/artifact-fs / createLocalEmptyCommitRepo

Function createLocalEmptyCommitRepo

e2e_bench_test.go:252–267  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

250}
251
252func createLocalEmptyCommitRepo(t *testing.T) string {
253 t.Helper()
254
255 bareDir := filepath.Join(t.TempDir(), "empty-repo.git")
256 workDir := filepath.Join(t.TempDir(), "work")
257
258 run(t, "", "git", "init", "--bare", bareDir)
259 run(t, "", "git", "clone", bareDir, workDir)
260 run(t, workDir, "git", "config", "user.name", "E2E Bench")
261 run(t, workDir, "git", "config", "user.email", "e2e-bench@test")
262 run(t, workDir, "git", "checkout", "-b", "main")
263 run(t, workDir, "git", "commit", "--allow-empty", "-m", "initial empty commit")
264 run(t, workDir, "git", "push", "origin", "main")
265
266 return "file://" + bareDir
267}
268
269func uniqueHydrationTargets(nodes []model.BaseNode) []model.BaseNode {
270 byOID := make(map[string]model.BaseNode)

Callers 1

TestE2EBenchmarkReposFunction · 0.85

Calls 2

JoinMethod · 0.80
runFunction · 0.70

Tested by

no test coverage detected