Skip to main content

stage_content

Function stage_content 

Source
pub fn stage_content(
    dir: &Path,
    rel_path: &str,
    content: &str,
) -> Result<(), String>
Expand description

Replace the index entry for rel_path with exactly content (used to stage a single hunk): hash the content into a blob and point the index at it, keeping the working tree untouched.

ยงErrors

Returns an error when the git plumbing commands fail.