This operation performs a merge of the branch into another specified branch.
Merging a branch into another one means to add all changes of this branch
into the specified target branch as a new single commit.
During a merge operation conflicts may occur. That will be indicated within the branch
response with state = IN_CONFLICT. In such a case the conflicts can be solved by the
client using the conflictSolvingBranch that points to !<originalBranchId>.
The merges property of the branch response depicts all merges that have been executed
and/or attempted. The most recent merge attempt is the one with the highest version number.
There may be only one merge attempt that is in progress at any time. All other / older
entries in the merges map depict merge operations that have been executed successfully
in the past.
Sample:
If a merge operation was started on branch myBranch and ends up in state = IN_CONFLICT
the resulting branch response could look like follows:
{
"id": "myBranch",
"baseRef": "main:11",
"state": "IN_CONFLICT",
"merges": {
"27": "main:42"
"15": "main:14"
}
"conflictSolvingBranch": "!myBranch"
}
Here "myBranch" is the ID of the branch that was attempted to be merged into branch
"main". It was attempted to merge version 27 of myBranch
as new commit (with version 42) into the branch "main".
Conflicts occurred during that operation, that is why state = "IN_CONFLICT" and
the ID of a "conflictSolvingBranch" with ID "!myBranch" was provided.
That conflict solving branch can be used like any other branch to solve the conflicts
by writing to it. All conflicting features in there are marked as such having set
conflicting = true in their XYZ namespace.