MCPcopy Index your code
hub / github.com/nikivdev/go / runCommit

Function runCommit

cli/flow/main.go:2567–2584  ·  view source on GitHub ↗
(ctx *snap.Context)

Source from the content-addressed store, hash-verified

2565}
2566
2567func runCommit(ctx *snap.Context) error {
2568 if ctx.NArgs() != 0 {
2569 return reportError(ctx, fmt.Errorf("Usage: %s commit", commandName))
2570 }
2571
2572 payload, err := prepareCommit(ctx)
2573 if err != nil {
2574 return err
2575 }
2576
2577 printProposedMessage(ctx, payload.message)
2578 if err := commitWithPayload(ctx, payload); err != nil {
2579 return err
2580 }
2581
2582 printCommitSuccess(ctx, payload)
2583 return nil
2584}
2585
2586func runCommitPush(ctx *snap.Context) error {
2587 if ctx.NArgs() != 0 {

Callers 1

mainFunction · 0.85

Calls 5

reportErrorFunction · 0.85
prepareCommitFunction · 0.85
printProposedMessageFunction · 0.85
commitWithPayloadFunction · 0.85
printCommitSuccessFunction · 0.85

Tested by

no test coverage detected