pub fn hash_worktree_file(
odb: &Odb,
path: &Path,
meta: &Metadata,
conv: &ConversionConfig,
file_attrs: &FileAttrs,
rel_path: &str,
index_entry: Option<&IndexEntry>,
filter_process: Option<&FilterProcessState>,
) -> Result<ObjectId>Expand description
Hash normalized worktree bytes for a path (does not write to the object database).
Files that need no clean conversion are hashed as a stream, without reading them into
memory, from 1 MiB (or core.bigFileThreshold when that is smaller).
ยงErrors
Returns Error::Io when the file cannot be read, and Error::Filter when a
filter.<driver>.required clean filter fails or cannot be started; content is never
stored or hashed unfiltered in that case.