Class GitBlameConsumer
- java.lang.Object
-
- org.apache.maven.scm.util.AbstractConsumer
-
- org.apache.maven.scm.provider.git.gitexe.command.blame.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 Summary
Fields Modifier and Type Field Description private java.lang.Stringauthorprivate java.util.Map<java.lang.String,BlameLine>commitInfoSince the porcelain format only contains the commit information the first time a specific sha-1 commit appears, we need to store this information somwehere.private java.lang.Stringcommitterprivate booleanexpectRevisionLineprivate static java.lang.StringGIT_AUTHORprivate static java.lang.StringGIT_COMMITTERprivate static java.lang.StringGIT_COMMITTER_PREFIXprivate static java.lang.StringGIT_COMMITTER_TIMEprivate java.util.List<BlameLine>linesprivate java.lang.Stringrevisionprivate java.util.Datetime-
Fields inherited from class org.apache.maven.scm.util.AbstractConsumer
logger
-
-
Constructor Summary
Constructors Constructor Description GitBlameConsumer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconsumeLine(java.lang.String line)java.util.List<BlameLine>getLines()-
Methods inherited from class org.apache.maven.scm.util.AbstractConsumer
parseDate, parseDate
-
-
-
-
Field Detail
-
GIT_COMMITTER_PREFIX
private static final java.lang.String GIT_COMMITTER_PREFIX
- See Also:
- Constant Field Values
-
GIT_COMMITTER
private static final java.lang.String GIT_COMMITTER
- See Also:
- Constant Field Values
-
GIT_COMMITTER_TIME
private static final java.lang.String GIT_COMMITTER_TIME
- See Also:
- Constant Field Values
-
GIT_AUTHOR
private static final java.lang.String GIT_AUTHOR
- See Also:
- Constant Field Values
-
lines
private final java.util.List<BlameLine> lines
-
commitInfo
private final 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: theBlameLinecontaining 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
-
-
Method Detail
-
consumeLine
public void consumeLine(java.lang.String line)
-
getLines
public java.util.List<BlameLine> getLines()
-
-