Skip to main content

materialize_pathspec_file

Function materialize_pathspec_file 

Source
pub fn materialize_pathspec_file(
    directory: &Path,
    effective_cwd: &Path,
    source: Option<&str>,
    standard_input: &mut dyn Read,
) -> Result<Option<PathBuf>>
Expand description

What: Resolves a pathspec-file source to the file the private index reads. Why: A regular source is read where it is named, relative to the invocation directory, and standard input is copied once into the transaction, so no second read sees different bytes.

In TS you’d write (pseudocode):

await materializePathspecFile({ workspace, effectiveCwd, source });