MCPcopy Create free account
hub / github.com/git-bug/git-bug / runPush

Function runPush

commands/push.go:26–44  ·  view source on GitHub ↗
(env *execenv.Env, args []string)

Source from the content-addressed store, hash-verified

24}
25
26func runPush(env *execenv.Env, args []string) error {
27 if len(args) > 1 {
28 return errors.New("Only pushing to one remote at a time is supported")
29 }
30
31 remote := "origin"
32 if len(args) == 1 {
33 remote = args[0]
34 }
35
36 stdout, err := env.Backend.Push(remote)
37 if err != nil {
38 return err
39 }
40
41 env.Out.Println(stdout)
42
43 return nil
44}

Callers 1

newPushCommandFunction · 0.85

Calls 3

PushMethod · 0.80
PrintlnMethod · 0.65
NewMethod · 0.45

Tested by

no test coverage detected