MergeBranch merges the indicated branch into its parent returning the commit tag of the new commit into the parent branch.
(ctx context.Context, poolID ksuid.KSUID, childBranch, parentBranch, author, message string)
| 378 | // MergeBranch merges the indicated branch into its parent returning the |
| 379 | // commit tag of the new commit into the parent branch. |
| 380 | func (r *Root) MergeBranch(ctx context.Context, poolID ksuid.KSUID, childBranch, parentBranch, author, message string) (ksuid.KSUID, error) { |
| 381 | pool, err := r.OpenPool(ctx, poolID) |
| 382 | if err != nil { |
| 383 | return ksuid.Nil, err |
| 384 | } |
| 385 | child, err := pool.OpenBranchByName(ctx, childBranch) |
| 386 | if err != nil { |
| 387 | return ksuid.Nil, err |
| 388 | } |
| 389 | parent, err := pool.OpenBranchByName(ctx, parentBranch) |
| 390 | if err != nil { |
| 391 | return ksuid.Nil, err |
| 392 | } |
| 393 | return child.mergeInto(ctx, parent, author, message) |
| 394 | } |
| 395 | |
| 396 | func (r *Root) Revert(ctx context.Context, poolID ksuid.KSUID, branchName string, commitID ksuid.KSUID, author, message string) (ksuid.KSUID, error) { |
| 397 | pool, err := r.OpenPool(ctx, poolID) |
nothing calls this directly
no test coverage detected