Skip to main content

forked

Function forked 

Source
pub fn forked(
    repo: &Path,
    from: &str,
    branch: &str,
    file: &str,
    at: Splice,
    what: &str,
    said: &str,
) -> Result<String, Trouble>
Expand description

Cuts a branch at from, replaces one class in file, and commits it.

Editing is forking. A commit is a version that has already been measured, so wanting to change one is wanting another variant from here: this never touches an existing branch and never rewrites anything, and the worst it can do is leave a branch nobody asked for. In a worktree of its own, so somebody’s checkout, index and unstaged work are left alone.