Crate gix_filter
source ·Expand description
A library for implementing everything needed to deal with git filter pipelines.
Generally, multiple filters are applied in a row forming a pipeline, with each filter being a stage in that pipeline. This pipeline is pre-determined with each stage being configurable.
The transformation on an input buffer goes in two ways: either a filter is applied, or its effects are undone. Differentiating between these states is important to avoid comparing unfiltered buffers with filtered ones, for example.
This crate implements the building blocks in terms of applying and undoing filters, along with logic to decide whether or not to apply such a filter.
Re-exports
pub use encoding_rs as encoding;
pub use gix_attributes as attributes;
Modules
- use filter programs to perform any kind of conversion.
- convert line endings in buffers
- a filter to replace
$Id$
with a git-hash of the buffer. - change encodings based on the
working-tree-encoding
attribute. Worktree encodings are powered by theencoding_rs
crate, which has a narrower focus than theiconv
library. Thus this implementation is inherently more limited but will handle the common cases.
Structs
- A declaration of a driver program.
- The standard git filter pipeline comprised of multiple standard filters and support for external filters.