class documentation

Filter driver for line ending conversion.

Class Method from_config Create a LineEndingFilter from git configuration.
Method __init__ Initialize LineEndingFilter.
Method clean Apply line ending conversion for checkin (working tree -> repository).
Method cleanup Clean up any resources held by this filter driver.
Method reuse Check if this filter driver should be reused with the given configuration.
Method smudge Apply line ending conversion for checkout (repository -> working tree).
Instance Variable binary_detection Undocumented
Instance Variable clean_conversion Undocumented
Instance Variable safecrlf Undocumented
Instance Variable smudge_conversion Undocumented
def from_config(cls, config: StackedConfig | None, for_text_attr: bool = False) -> LineEndingFilter:

Create a LineEndingFilter from git configuration.

Parameters
config:StackedConfig | NoneGit configuration stack
for_text_attr:boolIf True, always normalize on checkin (for text attribute)
Returns
LineEndingFilterConfigured LineEndingFilter instance
def __init__(self, clean_conversion: Callable[[bytes], bytes] | None = None, smudge_conversion: Callable[[bytes], bytes] | None = None, binary_detection: bool = True, safecrlf: bytes = b'false'):

Initialize LineEndingFilter.

def clean(self, data: bytes, path: bytes = b'') -> bytes:

Apply line ending conversion for checkin (working tree -> repository).

def cleanup(self):

Clean up any resources held by this filter driver.

def reuse(self, config: StackedConfig, filter_name: str) -> bool:

Check if this filter driver should be reused with the given configuration.

def smudge(self, data: bytes, path: bytes = b'') -> bytes:

Apply line ending conversion for checkout (repository -> working tree).

binary_detection =

Undocumented

clean_conversion =

Undocumented

safecrlf =

Undocumented

smudge_conversion =

Undocumented