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.String
author
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.private java.lang.String
committer
private boolean
expectRevisionLine
private static java.lang.String
GIT_AUTHOR
private static java.lang.String
GIT_COMMITTER
private static java.lang.String
GIT_COMMITTER_PREFIX
private static java.lang.String
GIT_COMMITTER_TIME
private java.util.List<BlameLine>
lines
private java.lang.String
revision
private java.util.Date
time
-
Constructor Summary
Constructors Constructor Description GitBlameConsumer(ScmLogger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
consumeLine(java.lang.String line)
java.util.List<BlameLine>
getLines()
-
Methods inherited from class org.apache.maven.scm.util.AbstractConsumer
getLogger, parseDate, parseDate, setLogger
-
-
-
-
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 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: theBlameLine
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()
-
-