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.
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 value may be a wildcard (eg, "name=*"), in which case the filter will be invoked for any value for the given attribute name. See the attribute parameter of the check
callback for the attribute value that was specified.
Called to determine whether the filter should be invoked for a given file. If this function returns GIT_PASSTHROUGH
then the apply
function will not be invoked and the contents will be passed through unmodified.
Called to actually apply the filter to file contents. If this function returns GIT_PASSTHROUGH
then the contents will be passed through unmodified.
Called to apply the filter in a streaming manner. If this is not specified then the system will call apply
with the whole buffer.