Package org.hjug.git
Class GitLogReader
- java.lang.Object
-
- org.hjug.git.GitLogReader
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class GitLogReader extends java.lang.Object implements java.lang.AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description GitLogReader()GitLogReader(java.io.File basedir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.TreeMap<java.lang.Integer,java.lang.Integer>captureChangeCountByCommitTimestamp()voidclose()ScmLogInfofileLog(java.lang.String path)Returns the number of commits and earliest commit for a given path TODO: Move to a different class???java.io.FilegetGitDir(java.io.File basedir)org.eclipse.jgit.lib.RepositorygitRepository(java.io.File basedir)java.util.Map<java.lang.String,java.io.ByteArrayOutputStream>listRepositoryContentsAtHEAD(org.eclipse.jgit.lib.Repository repository)
-
-
-
Method Detail
-
close
public void close() throws java.lang.Exception- Specified by:
closein interfacejava.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.GitAPIExceptionjava.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.IOExceptionorg.eclipse.jgit.api.errors.GitAPIException
-
-