public class GitStatusConsumer extends Object implements StreamConsumer
| Constructor and Description |
|---|
GitStatusConsumer(ScmLogger logger,
File workingDirectory)
Consumer when workingDirectory and repositoryRootDirectory are the same
|
GitStatusConsumer(ScmLogger logger,
File workingDirectory,
URI relativeRepositoryPath)
Assuming that you have to discover the repositoryRoot, this is how you can get the
relativeRepositoryPath |
| Modifier and Type | Method and Description |
|---|---|
void |
consumeLine(String line) |
List<ScmFile> |
getChangedFiles() |
protected static String |
resolvePath(String fileEntry,
URI path) |
static URI |
resolveURI(String fileEntry,
URI path) |
public GitStatusConsumer(ScmLogger logger, File workingDirectory)
logger - the loggerworkingDirectory - the working directorypublic GitStatusConsumer(ScmLogger logger, File workingDirectory, URI relativeRepositoryPath)
relativeRepositoryPath
URI.create( repositoryRoot ).relativize( fileSet.getBasedir().toURI() )
logger - the loggerworkingDirectory - the working directoryrelativeRepositoryPath - the working directory relative to the repository rootGitStatusCommand.createRevparseShowToplevelCommand(org.apache.maven.scm.ScmFileSet)public void consumeLine(String line)
consumeLine in interface StreamConsumerprotected static String resolvePath(String fileEntry, URI path)
public static URI resolveURI(String fileEntry, URI path)
fileEntry - the fileEntry, must not be nullpath - the path, must not be nullpublic List<ScmFile> getChangedFiles()
Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.