Function gix_filter::eol::convert_to_git

source ยท
pub fn convert_to_git(
    src: &[u8],
    digest: AttributesDigest,
    buf: &mut Vec<u8>,
    index_object: &mut IndexObjectFn<'_>,
    _: Options<'_>,
) -> Result<bool, Error>
Expand description

Given a src buffer, change it git (\n) line endings and store the result in buf. Return true if buf was written or false if nothing had to be done. Depending on the state in buf, index_object is called to write the version of src as stored in the index into the buffer and if it is a blob, or return Ok(None) if no such object exists. If renormalization is desired, let it return Ok(None) at all times to not let it have any influence over the outcome of this function. If round_trip_check is not None, round-tripping will be validated and handled accordingly.