Package org.hjug.git

Class GitLogReader

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class GitLogReader
    extends java.lang.Object
    implements java.lang.AutoCloseable
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.TreeMap<java.lang.Integer,​java.lang.Integer> captureChangeCountByCommitTimestamp()  
      void close()  
      ScmLogInfo fileLog​(java.lang.String path)
      Returns the number of commits and earliest commit for a given path TODO: Move to a different class???
      java.io.File getGitDir​(java.io.File basedir)  
      org.eclipse.jgit.lib.Repository gitRepository​(java.io.File basedir)  
      java.util.Map<java.lang.String,​java.io.ByteArrayOutputStream> listRepositoryContentsAtHEAD​(org.eclipse.jgit.lib.Repository repository)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GitLogReader

        public GitLogReader()
      • GitLogReader

        public GitLogReader​(java.io.File basedir)
                     throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception
      • gitRepository

        public org.eclipse.jgit.lib.Repository gitRepository​(java.io.File basedir)
                                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • getGitDir

        public java.io.File getGitDir​(java.io.File basedir)
      • listRepositoryContentsAtHEAD

        public java.util.Map<java.lang.String,​java.io.ByteArrayOutputStream> listRepositoryContentsAtHEAD​(org.eclipse.jgit.lib.Repository repository)
                                                                                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • fileLog

        public ScmLogInfo fileLog​(java.lang.String path)
                           throws org.eclipse.jgit.api.errors.GitAPIException,
                                  java.io.IOException
        Returns the number of commits and earliest commit for a given path TODO: Move to a different class???
        Parameters:
        path -
        Returns:
        a LogInfo object
        Throws:
        org.eclipse.jgit.api.errors.GitAPIException
        java.io.IOException
      • captureChangeCountByCommitTimestamp

        public java.util.TreeMap<java.lang.Integer,​java.lang.Integer> captureChangeCountByCommitTimestamp()
                                                                                                         throws java.io.IOException,
                                                                                                                org.eclipse.jgit.api.errors.GitAPIException
        Throws:
        java.io.IOException
        org.eclipse.jgit.api.errors.GitAPIException