Class GitDiffConsumer

  • All Implemented Interfaces:
    org.codehaus.plexus.util.cli.StreamConsumer

    public class GitDiffConsumer
    extends java.lang.Object
    implements org.codehaus.plexus.util.cli.StreamConsumer
    • Field Detail

      • DIFF_FILES_PATTERN

        private static final java.util.regex.Pattern DIFF_FILES_PATTERN
        patern matches the index line of the diff comparison paren.1 matches the first file paren.2 matches the 2nd file
      • START_REVISION_TOKEN

        private static final java.lang.String START_REVISION_TOKEN
        See Also:
        Constant Field Values
      • END_REVISION_TOKEN

        private static final java.lang.String END_REVISION_TOKEN
        See Also:
        Constant Field Values
      • ADDED_LINE_TOKEN

        private static final java.lang.String ADDED_LINE_TOKEN
        See Also:
        Constant Field Values
      • REMOVED_LINE_TOKEN

        private static final java.lang.String REMOVED_LINE_TOKEN
        See Also:
        Constant Field Values
      • UNCHANGED_LINE_TOKEN

        private static final java.lang.String UNCHANGED_LINE_TOKEN
        See Also:
        Constant Field Values
      • CHANGE_SEPARATOR_TOKEN

        private static final java.lang.String CHANGE_SEPARATOR_TOKEN
        See Also:
        Constant Field Values
      • NO_NEWLINE_TOKEN

        private static final java.lang.String NO_NEWLINE_TOKEN
        See Also:
        Constant Field Values
      • INDEX_LINE_TOKEN

        private static final java.lang.String INDEX_LINE_TOKEN
        See Also:
        Constant Field Values
      • NEW_FILE_MODE_TOKEN

        private static final java.lang.String NEW_FILE_MODE_TOKEN
        See Also:
        Constant Field Values
      • DELETED_FILE_MODE_TOKEN

        private static final java.lang.String DELETED_FILE_MODE_TOKEN
        See Also:
        Constant Field Values
      • currentFile

        private java.lang.String currentFile
      • currentDifference

        private java.lang.StringBuilder currentDifference
      • changedFiles

        private java.util.List<ScmFile> changedFiles
      • differences

        private java.util.Map<java.lang.String,​java.lang.CharSequence> differences
      • patch

        private java.lang.StringBuilder patch
    • Constructor Detail

      • GitDiffConsumer

        public GitDiffConsumer​(ScmLogger logger,
                               java.io.File workingDirectory)
    • Method Detail

      • consumeLine

        public void consumeLine​(java.lang.String line)
        Specified by:
        consumeLine in interface org.codehaus.plexus.util.cli.StreamConsumer
      • getChangedFiles

        public java.util.List<ScmFile> getChangedFiles()
      • getDifferences

        public java.util.Map<java.lang.String,​java.lang.CharSequence> getDifferences()
      • getPatch

        public java.lang.String getPatch()