org.apache.maven.scm.provider.git.gitexe.command.status

## Class GitStatusConsumer

- java.lang.Object
- - org.apache.maven.scm.provider.git.gitexe.command.status.GitStatusConsumer

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

    public class GitStatusConsumer
    extends Object
    implements org.codehaus.plexus.util.cli.StreamConsumer

Author:
  Mark Struberg

### Constructor Summary

Constructors
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`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `consumeLine(String line)`
`List<ScmFile>` `getChangedFiles()`
`protected static String` `resolvePath(String fileEntry, URI path)`
`static URI` `resolveURI(String fileEntry, URI path)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### GitStatusConsumer

    public GitStatusConsumer(ScmLogger logger,
                             File workingDirectory)

Consumer when workingDirectory and repositoryRootDirectory are the same

Parameters:
  `logger` - the logger
  `workingDirectory` - the working directory

#### GitStatusConsumer

    public GitStatusConsumer(ScmLogger logger,
                             File workingDirectory,
                             URI relativeRepositoryPath)

Assuming that you have to discover the repositoryRoot, this is how you can get the `relativeRepositoryPath`

     URI.create( repositoryRoot ).relativize( fileSet.getBasedir().toURI() )

Parameters:
  `logger` - the logger
  `workingDirectory` - the working directory
  `relativeRepositoryPath` - the working directory relative to the repository root
Since:
  1.9
See Also:
  `GitStatusCommand.createRevparseShowToplevelCommand(org.apache.maven.scm.ScmFileSet)`

### Method Detail

#### consumeLine

    public void consumeLine(String line)

Specified by:
  `consumeLine` in interface `org.codehaus.plexus.util.cli.StreamConsumer`

#### resolvePath

    protected static String resolvePath(String fileEntry,
                                        URI path)

#### resolveURI

    public static URI resolveURI(String fileEntry,
                                 URI path)

Parameters:
  `fileEntry` - the fileEntry, must not be `null`
  `path` - the path, must not be `null`
Returns:

#### getChangedFiles

    public List<ScmFile> getChangedFiles()