class documentation

Blob normalizer that applies clean/smudge filters based on gitattributes.

This can be used in addition to or instead of line ending normalization.

Method __del__ Clean up filter drivers on destruction.
Method __init__ Initialize FilterBlobNormalizer.
Method checkin_normalize Apply clean filter during checkin (working tree -> repository).
Method checkout_normalize Apply smudge filter during checkout (repository -> working tree).
Method close Close all filter drivers, ensuring process cleanup.
Instance Variable config_stack Undocumented
Instance Variable filter_context Undocumented
Instance Variable filter_registry Undocumented
Instance Variable gitattributes Undocumented
Instance Variable _owns_context Undocumented
def __del__(self):

Clean up filter drivers on destruction.

def __init__(self, config_stack: StackedConfig | None, gitattributes: GitAttributes, filter_registry: FilterRegistry | None = None, repo: BaseRepo | None = None, filter_context: FilterContext | None = None):

Initialize FilterBlobNormalizer.

Parameters
config_stack:StackedConfig | NoneGit configuration stack
gitattributes:GitAttributesGitAttributes instance
filter_registry:FilterRegistry | NoneOptional filter registry to use (deprecated, use filter_context)
repo:BaseRepo | NoneOptional repository instance
filter_context:FilterContext | NoneOptional filter context to use for managing filter state
def checkin_normalize(self, blob: Blob, path: bytes) -> Blob:

Apply clean filter during checkin (working tree -> repository).

def checkout_normalize(self, blob: Blob, path: bytes) -> Blob:

Apply smudge filter during checkout (repository -> working tree).

def close(self):

Close all filter drivers, ensuring process cleanup.

config_stack =

Undocumented

filter_context =

Undocumented

filter_registry =

Undocumented

gitattributes =

Undocumented

_owns_context: bool =

Undocumented