MCPcopy Create free account
hub / github.com/cwarden/git-add--interactive / RunCommandWithStdin

Method RunCommandWithStdin

internal/git/repository.go:64–69  ·  view source on GitHub ↗
(stdin []byte, args ...string)

Source from the content-addressed store, hash-verified

62}
63
64func (r *Repository) RunCommandWithStdin(stdin []byte, args ...string) error {
65 cmd := exec.Command("git", args...)
66 cmd.Dir = r.workTree
67 cmd.Stdin = bytes.NewReader(stdin)
68 return cmd.Run()
69}
70
71func (r *Repository) GetConfig(key string) (string, error) {
72 output, err := r.RunCommand("config", key)

Callers 3

ApplyPatchMethod · 0.95
CheckPatchMethod · 0.95
revertCmdMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected