MCPcopy
hub / github.com/kptdev/kpt / copyAddData

Function copyAddData

internal/testutil/testutil.go:630–644  ·  view source on GitHub ↗
(repo string, data string)

Source from the content-addressed store, hash-verified

628}
629
630func copyAddData(repo string, data string) error {
631 err := copyutil.CopyDir(data, repo)
632 if err != nil {
633 return err
634 }
635
636 cmd := exec.Command("git", "add", ".")
637 cmd.Dir = repo
638 _, err = cmd.CombinedOutput()
639 if err != nil {
640 return err
641 }
642
643 return nil
644}
645
646func commit(repo, message string) error {
647 cmd := exec.Command("git", "commit", "-m", message)

Callers 1

SetupTestGitRepoMethod · 0.85

Calls 1

CommandMethod · 0.45

Tested by

no test coverage detected