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 StreamConsumer
protected static String resolvePath(String fileEntry, URI path)
public static URI resolveURI(String fileEntry, URI path)
fileEntry
- the fileEntry, must not be null
path
- the path, must not be null
public List<ScmFile> getChangedFiles()
Copyright © 2003–2015 The Apache Software Foundation. All rights reserved.