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

Function parseStatusOutput

e2e_git_test.go:491–507  ·  view source on GitHub ↗
(out string)

Source from the content-addressed store, hash-verified

489 if err := os.WriteFile(readmePath, []byte(updated), 0o644); err != nil {
490 t.Fatal(err)
491 }
492 gitCmd(t, repo.mountPath, "add", "README.md")
493 preCommitHEAD := strings.TrimSpace(gitCmd(t, repo.mountPath, "rev-parse", "HEAD"))
494 gitCmd(t, repo.mountPath,
495 "-c", "user.name=E2E Test",
496 "-c", "user.email=e2e@test",
497 "commit", "-m", "modify readme in e2e",
498 )
499
500 waitForHeadAndStatus(t, repo.mountPath, preCommitHEAD, map[string]string{})
501 if got := readFileStr(t, readmePath); got != updated {
502 t.Fatalf("README.md after commit = %q", got)
503 }
504 if logOut := gitCmd(t, repo.mountPath, "log", "--oneline", "-1"); !strings.Contains(logOut, "modify readme in e2e") {
505 t.Fatalf("expected commit message in log, got %q", logOut)
506 }
507}
508
509func TestE2EGitCommitPreservesUnstagedAfterStagedCommit(t *testing.T) {
510 repo := newMountedE2ERepo(t)

Callers 2

waitForBranchAndStatusFunction · 0.85
waitForHeadAndStatusFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected