Class CleanFilter


  • public class CleanFilter
    extends FilterCommand
    Built-in LFS clean filter When new content is about to be added to the git repository and this filter is configured for that content, then this filter will replace the original content with content of a so-called LFS pointer file. The pointer file content will then be added to the git repository. Additionally this filter writes the original content in a so-called 'media file' to '.git/lfs/objects/ <first-two-characters-of-contentid>/<rest-of-contentid>'
    Since:
    4.6
    See Also:
    Git LFS Specification
    • Constructor Detail

      • CleanFilter

        public CleanFilter​(Repository db,
                           java.io.InputStream in,
                           java.io.OutputStream out)
                    throws java.io.IOException
        Constructor for CleanFilter.
        Parameters:
        db - the repository
        in - an InputStream providing the original content
        out - the OutputStream into which the content of the pointer file should be written. That's the content which will be added to the git repository
        Throws:
        java.io.IOException - when the creation of the temporary file fails or when no OutputStream for this file can be created