Skip to main content

smudge_object_to

Function smudge_object_to 

Source
pub fn smudge_object_to<W: Write>(
    store: &Store,
    pointer: &Pointer,
    output: &mut W,
    path: &str,
    extensions: &[SmudgeExtension],
    spawn_cwd: Option<&Path>,
) -> Result<(), SmudgeError>
Expand description

Stream the working-tree content for an already-parsed pointer to output.

Used by pull and checkout, which have the pointer in hand from the index walk. spawn_cwd is the working directory each extension subprocess runs from: pass Some(work_tree_root) from pull or checkout (so a git lfs pull invoked from a subdirectory still finds .git/); the smudge filter (called by git from the work-tree root) can pass None to inherit the parent’s cwd.

The caller must have already verified store.contains_with_size; this function won’t fetch.