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.

Modules

  • Utilities around driver programs.
  • utilities related to handling line endings in buffers
  • Utilities for handling worktree encodings. Worktree encodings are powered by the encoding_rs crate, which has a narrower focus than the iconv library. Thus this implementation is inherently more limited but will handle the common cases.

Structs

  • A declaration of a driver program.