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

Function gitStatusShortMap

e2e_git_test.go:407–425  ·  view source on GitHub ↗
(t *testing.T, dir string)

Source from the content-addressed store, hash-verified

405func TestE2EGitCheckoutRestorePath(t *testing.T) {
406 repo := newMountedE2ERepo(t)
407
408 readmePath := filepath.Join(repo.mountPath, "README.md")
409 readmeOrig := readFileEventually(t, readmePath)
410 if err := os.WriteFile(readmePath, []byte(readmeOrig+"local change\n"), 0o644); err != nil {
411 t.Fatal(err)
412 }
413 assertGitStatus(t, repo.mountPath, map[string]string{"README.md": " M"})
414
415 gitCmd(t, repo.mountPath, "checkout", "--", "README.md")
416 assertGitStatus(t, repo.mountPath, map[string]string{})
417 if got := readFileStr(t, readmePath); got != readmeOrig {
418 t.Fatalf("README.md after checkout -- = %q, want original content", got)
419 }
420}
421
422func TestE2EGitMergeAndRebase(t *testing.T) {
423 repo := newMountedE2ERepo(t)
424
425 gitCmd(t, repo.mountPath, "checkout", "-b", "feature")
426 writeTestFile(t, repo.mountPath, "FEATURE.md", "feature\n")
427 gitCmd(t, repo.mountPath, "add", "FEATURE.md")
428 gitCmd(t, repo.mountPath,

Callers 1

assertGitStatusFunction · 0.85

Calls 1

gitCmdFunction · 0.85

Tested by

no test coverage detected