Filter structure used to register custom filters.
To associate extra data with a filter, allocate extra data and put the
git_filter
struct at the start of your data buffer, then cast the
self
pointer to your larger structure when your callback is invoked.
version
should be set to GIT_FILTER_VERSION
attributes
is a whitespace-separated list of attribute names to check
for this filter (e.g. "eol crlf text"). If the attribute name is bare,
it will be simply loaded and passed to the check
callback. If it has
a value (i.e. "name=value"), the attribute must match that value for
the filter to be applied.
The initialize
, shutdown
, check
, apply
, and cleanup
callbacks
are all documented above with the respective function pointer typedefs.