Function branch
pub fn branch(
source: &AutoCommit,
to_workspace: &str,
) -> Result<AutoCommit, TransferError>Expand description
A branch’s copy of source, a document of a workspace branched into to_workspace: its whole
history, under a writer of its own, with one more change naming to_workspace as the workspace
it is in when it names one at all. Its id stays: a record id names a document only inside its
workspace (super::workspace_scope), and a branch is a whole workspace forked, so every
reference one of its records makes to another still names the same one. Where it was minted
(home) stays too, as its provenance. source is not changed.
§Errors
to_workspace is empty, or the document’s metadata cannot name it.