MCPcopy Create free account
hub / github.com/brimdata/super / CreateBranch

Method CreateBranch

api/client/connection.go:263–271  ·  view source on GitHub ↗
(ctx context.Context, poolID ksuid.KSUID, payload api.BranchPostRequest)

Source from the content-addressed store, hash-verified

261}
262
263func (c *Connection) CreateBranch(ctx context.Context, poolID ksuid.KSUID, payload api.BranchPostRequest) (branches.Config, error) {
264 req := c.NewRequest(ctx, http.MethodPost, path.Join("/pool", poolID.String()), payload)
265 var branch branches.Config
266 err := c.doAndUnmarshal(req, &branch)
267 if errIsStatus(err, http.StatusConflict) {
268 err = ErrBranchExists
269 }
270 return branch, err
271}
272
273func (c *Connection) MergeBranch(ctx context.Context, poolID ksuid.KSUID, childBranch, parentBranch string, message api.CommitMessage) (api.CommitResponse, error) {
274 path := urlPath("pool", poolID.String(), "branch", parentBranch, "merge", childBranch)

Callers

nothing calls this directly

Calls 4

NewRequestMethod · 0.95
doAndUnmarshalMethod · 0.95
errIsStatusFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected