MCPcopy Index your code
hub / github.com/git-bug/git-bug / newPushCommand

Function newPushCommand

commands/push.go:12–24  ·  view source on GitHub ↗
(env *execenv.Env)

Source from the content-addressed store, hash-verified

10)
11
12func newPushCommand(env *execenv.Env) *cobra.Command {
13 cmd := &cobra.Command{
14 Use: "push [REMOTE]",
15 Short: "Push updates to a git remote",
16 PreRunE: execenv.LoadBackend(env),
17 RunE: execenv.CloseBackend(env, func(cmd *cobra.Command, args []string) error {
18 return runPush(env, args)
19 }),
20 ValidArgsFunction: completion.GitRemote(env),
21 }
22
23 return cmd
24}
25
26func runPush(env *execenv.Env, args []string) error {
27 if len(args) > 1 {

Callers 1

NewRootCommandFunction · 0.85

Calls 4

LoadBackendFunction · 0.92
CloseBackendFunction · 0.92
GitRemoteFunction · 0.92
runPushFunction · 0.85

Tested by

no test coverage detected