Class GitBlameConsumer

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

    public class GitBlameConsumer
    extends AbstractConsumer
    Parses the --porcelain format of git-blame For more information about the porcelain format, please read the official GIT blame porcelain format description.
    Since:
    1.4
    • Field Detail

      • GIT_COMMITTER_PREFIX

        private static final java.lang.String GIT_COMMITTER_PREFIX
        See Also:
        Constant Field Values
      • GIT_COMMITTER_TIME

        private static final java.lang.String GIT_COMMITTER_TIME
        See Also:
        Constant Field Values
      • lines

        private java.util.List<BlameLine> lines
      • commitInfo

        private java.util.Map<java.lang.String,​BlameLine> commitInfo
        Since the porcelain format only contains the commit information the first time a specific sha-1 commit appears, we need to store this information somwehere. key: the sha-1 of the commit value: the BlameLine containing the full committer/author info
      • expectRevisionLine

        private boolean expectRevisionLine
      • revision

        private java.lang.String revision
      • author

        private java.lang.String author
      • committer

        private java.lang.String committer
      • time

        private java.util.Date time
    • Constructor Detail

      • GitBlameConsumer

        public GitBlameConsumer​(ScmLogger logger)
    • Method Detail

      • consumeLine

        public void consumeLine​(java.lang.String line)
      • getLines

        public java.util.List<BlameLine> getLines()