Skip to main content

file_contents

Function file_contents 

Source
pub fn file_contents(
    endpoint: &RemoteEndpoint,
    workdir: &Path,
    head_sha: Option<&str>,
    rel: &Path,
    cancel: &CancelToken,
) -> Result<FileContents, RemoteGitError>
Expand description

One file’s HEAD/index blob bytes via machine-readable presence checks (ls-tree/ls-files, -z, literal pathspec) followed by cat-file on the recorded oid — never a :path spelling whose absence would need stderr matching to interpret.