Class GitInfoConsumer

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

    public class GitInfoConsumer
    extends AbstractConsumer
    Parses output of git log with a particular format and populates a InfoItem.
    Since:
    1.5
    See Also:
    Pretty Formats
    • Field Detail

      • infoItem

        private final InfoItem infoItem
      • revisionLength

        private final int revisionLength
    • Constructor Detail

      • GitInfoConsumer

        public GitInfoConsumer​(java.nio.file.Path path,
                               int revisionLength)
    • Method Detail

      • consumeLine

        public void consumeLine​(java.lang.String line)
        Parameters:
        line - the line which is supposed to have the format as specified by getFormatArgument()
        See Also:
        StreamConsumer.consumeLine(java.lang.String)
      • getInfoItem

        public InfoItem getInfoItem()
      • getFormatArgument

        public static org.codehaus.plexus.util.cli.Arg getFormatArgument()
        The format argument to use with git log
        Returns:
        the format argument to use git log command
        See Also:
        Pretty Formats