MCPcopy Index your code
hub / github.com/jetify-com/devbox / createCommit

Function createCommit

internal/pullbox/git/push.go:49–63  ·  view source on GitHub ↗
(dir string)

Source from the content-addressed store, hash-verified

47}
48
49func createCommit(dir string) error {
50 cmd := cmdutil.CommandTTY("git", "add", ".")
51 cmd.Dir = dir
52 if err := cmd.Run(); err != nil {
53 return errors.WithStack(err)
54 }
55 cmd, buf := cmdutil.CommandTTYWithBuffer(
56 "git", "commit", "-m", "devbox commit")
57 cmd.Dir = dir
58 err := cmd.Run()
59 if strings.Contains(buf.String(), nothingToCommitErrorText) {
60 return nil
61 }
62 return errors.WithStack(err)
63}
64
65func push(dir string) error {
66 cmd := cmdutil.CommandTTY("git", "push")

Callers 1

PushFunction · 0.85

Calls 4

CommandTTYFunction · 0.92
CommandTTYWithBufferFunction · 0.92
RunMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected