Module gix_filter::eol
source · Expand description
convert line endings in buffers
Modules§
Structs§
- Git Configuration that affects how CRLF conversions are applied.
- Statistics about a buffer that helps to safely perform EOL conversions
Enums§
- The combination of
crlf
,text
andeol
attributes into one neat package. - Possible states for the
core.autocrlf
. - The kind of end of lines to set.
Functions§
- Given a
src
buffer, change itgit
(\n
) line endings and store the result inbuf
. Returntrue
ifbuf
was written orfalse
if nothing had to be done. Depending on the state inbuf
,index_object
is called to write the version ofsrc
as stored in the index into the buffer and if it is a blob, or returnOk(None)
if no such object exists. If renormalization is desired, let it returnOk(None)
at all times to not let it have any influence over the outcome of this function. Ifround_trip_check
is notNone
, round-tripping will be validated and handled accordingly. - Convert all
\n
insrc
tocrlf
ifdigest
andconfig
indicate it, returningtrue
ifbuf
holds the result, orfalse
if no change was made after all.