Class GitStatusConsumer

    • Constructor Detail

      • GitStatusConsumer

        public GitStatusConsumer​(File workingDirectory)
        Consumer when workingDirectory and repositoryRootDirectory are the same
        Parameters:
        workingDirectory - the working directory
      • GitStatusConsumer

        public GitStatusConsumer​(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:
        workingDirectory - the working directory
        relativeRepositoryPath - the working directory relative to the repository root
        Since:
        1.9
        See Also:
        GitStatusCommand.createRevparseShowPrefix(ScmFileSet)
      • GitStatusConsumer

        public GitStatusConsumer​(File workingDirectory,
                                 ScmFileSet scmFileSet)
        Assuming that you have to discover the repositoryRoot, this is how you can get the relativeRepositoryPath
         URI.create( repositoryRoot ).relativize( fileSet.getBasedir().toURI() )
         
        Parameters:
        workingDirectory - the working directory
        scmFileSet - fileset with includes and excludes
        Since:
        1.11.0
        See Also:
        GitStatusCommand.createRevparseShowPrefix(ScmFileSet)
      • GitStatusConsumer

        public GitStatusConsumer​(File workingDirectory,
                                 URI relativeRepositoryPath,
                                 ScmFileSet scmFileSet)
        Assuming that you have to discover the repositoryRoot, this is how you can get the relativeRepositoryPath
         URI.create( repositoryRoot ).relativize( fileSet.getBasedir().toURI() )
         
        Parameters:
        workingDirectory - the working directory
        relativeRepositoryPath - the working directory relative to the repository root
        scmFileSet - fileset with includes and excludes
        Since:
        1.11.0
        See Also:
        GitStatusCommand.createRevparseShowPrefix(ScmFileSet)
    • Method Detail

      • 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:
        TODO
      • uriFromPath

        public static URI uriFromPath​(String path)
        Create an URI whose getPath() returns the given path and getScheme() returns null. The path may contain spaces, colons, and other special characters.
        Parameters:
        path - the path.
        Returns:
        the new URI