Skip to main content

create_branch

Function create_branch 

Source
pub fn create_branch(
    db: &Db,
    name: &str,
    base_seq: u64,
) -> Result<BranchRecord, Error>
Expand description

Fork a branch from base_seq.

Refuses a base that does not exist yet, and a base below the history floor. The second refusal is the one that matters: a branch whose fork point has been pruned can never be three-way merged, because the BASE side of the comparison is gone. Allowing the fork would only defer the failure to merge time, when work has already been done on the branch.