public class GitHelper
extends java.lang.Object
| Constructor and Description |
|---|
GitHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkout(org.eclipse.jgit.lib.Repository repository,
java.lang.String commitId) |
static java.io.File |
cloneBareRepository(java.io.File folder,
java.lang.String cloneUrl) |
static org.eclipse.jgit.lib.Repository |
cloneIfNotExists(java.lang.String projectPath,
java.lang.String cloneUrl) |
int |
countCommits(org.eclipse.jgit.lib.Repository repository,
java.lang.String branch) |
org.eclipse.jgit.revwalk.RevWalk |
createAllRevsWalk(org.eclipse.jgit.lib.Repository repository) |
org.eclipse.jgit.revwalk.RevWalk |
createAllRevsWalk(org.eclipse.jgit.lib.Repository repository,
java.lang.String branch) |
org.eclipse.jgit.revwalk.RevWalk |
fetchAndCreateNewRevsWalk(org.eclipse.jgit.lib.Repository repository) |
org.eclipse.jgit.revwalk.RevWalk |
fetchAndCreateNewRevsWalk(org.eclipse.jgit.lib.Repository repository,
java.lang.String branch) |
void |
fileTreeDiff(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.revwalk.RevCommit current,
java.util.List<java.lang.String> javaFilesBefore,
java.util.List<java.lang.String> javaFilesCurrent,
java.util.Map<java.lang.String,java.lang.String> renamedFilesHint,
boolean detectRenames,
FilePathFilter fileExtensions) |
static void |
fileTreeDiff(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.revwalk.RevCommit commitBefore,
org.eclipse.jgit.revwalk.RevCommit commitAfter,
java.util.List<SourceFile> filesBefore,
java.util.List<SourceFile> filesAfter,
FilePathFilter fileExtensions) |
static void |
forEachNonMergeCommit(org.eclipse.jgit.lib.Repository repo,
int maxDepth,
java.util.function.BiConsumer<org.eclipse.jgit.revwalk.RevCommit,org.eclipse.jgit.revwalk.RevCommit> function) |
static void |
forEachNonMergeCommit(org.eclipse.jgit.lib.Repository repo,
java.lang.String startAt,
int maxDepth,
java.util.function.BiConsumer<org.eclipse.jgit.revwalk.RevCommit,org.eclipse.jgit.revwalk.RevCommit> function) |
static PairBeforeAfter<SourceFileSet> |
getSourcesBeforeAndAfterCommit(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.revwalk.RevCommit commitBefore,
org.eclipse.jgit.revwalk.RevCommit commitAfter,
FilePathFilter fileExtensions) |
static PairBeforeAfter<SourceFileSet> |
getSourcesBeforeAndAfterCommit(org.eclipse.jgit.lib.Repository repository,
java.lang.String commitId,
FilePathFilter fileExtensions) |
static PairBeforeAfter<SourceFileSet> |
getSourcesBeforeAndAfterCommit(org.eclipse.jgit.lib.Repository repository,
java.lang.String commitIdBefore,
java.lang.String commitIdAfter,
FilePathFilter fileExtensions) |
boolean |
isCommitAnalyzed(java.lang.String sha1) |
static org.eclipse.jgit.lib.Repository |
openRepository(java.io.File repositoryPath) |
static org.eclipse.jgit.lib.Repository |
openRepository(java.lang.String repositoryPath) |
org.eclipse.jgit.revwalk.RevCommit |
resolveCommit(org.eclipse.jgit.lib.Repository repository,
java.lang.String commitId) |
public static org.eclipse.jgit.lib.Repository cloneIfNotExists(java.lang.String projectPath,
java.lang.String cloneUrl)
throws java.lang.Exception
java.lang.Exceptionpublic static java.io.File cloneBareRepository(java.io.File folder,
java.lang.String cloneUrl)
public static org.eclipse.jgit.lib.Repository openRepository(java.lang.String repositoryPath)
throws java.lang.Exception
java.lang.Exceptionpublic static org.eclipse.jgit.lib.Repository openRepository(java.io.File repositoryPath)
public static void forEachNonMergeCommit(org.eclipse.jgit.lib.Repository repo,
java.lang.String startAt,
int maxDepth,
java.util.function.BiConsumer<org.eclipse.jgit.revwalk.RevCommit,org.eclipse.jgit.revwalk.RevCommit> function)
public static void forEachNonMergeCommit(org.eclipse.jgit.lib.Repository repo,
int maxDepth,
java.util.function.BiConsumer<org.eclipse.jgit.revwalk.RevCommit,org.eclipse.jgit.revwalk.RevCommit> function)
public static void checkout(org.eclipse.jgit.lib.Repository repository,
java.lang.String commitId)
throws java.lang.Exception
java.lang.Exceptionpublic org.eclipse.jgit.revwalk.RevCommit resolveCommit(org.eclipse.jgit.lib.Repository repository,
java.lang.String commitId)
throws java.lang.Exception
java.lang.Exceptionpublic static PairBeforeAfter<SourceFileSet> getSourcesBeforeAndAfterCommit(org.eclipse.jgit.lib.Repository repository, org.eclipse.jgit.revwalk.RevCommit commitBefore, org.eclipse.jgit.revwalk.RevCommit commitAfter, FilePathFilter fileExtensions)
public static PairBeforeAfter<SourceFileSet> getSourcesBeforeAndAfterCommit(org.eclipse.jgit.lib.Repository repository, java.lang.String commitId, FilePathFilter fileExtensions)
public static PairBeforeAfter<SourceFileSet> getSourcesBeforeAndAfterCommit(org.eclipse.jgit.lib.Repository repository, java.lang.String commitIdBefore, java.lang.String commitIdAfter, FilePathFilter fileExtensions)
public int countCommits(org.eclipse.jgit.lib.Repository repository,
java.lang.String branch)
throws java.lang.Exception
java.lang.Exceptionpublic org.eclipse.jgit.revwalk.RevWalk fetchAndCreateNewRevsWalk(org.eclipse.jgit.lib.Repository repository)
throws java.lang.Exception
java.lang.Exceptionpublic org.eclipse.jgit.revwalk.RevWalk fetchAndCreateNewRevsWalk(org.eclipse.jgit.lib.Repository repository,
java.lang.String branch)
throws java.lang.Exception
java.lang.Exceptionpublic org.eclipse.jgit.revwalk.RevWalk createAllRevsWalk(org.eclipse.jgit.lib.Repository repository)
throws java.lang.Exception
java.lang.Exceptionpublic org.eclipse.jgit.revwalk.RevWalk createAllRevsWalk(org.eclipse.jgit.lib.Repository repository,
java.lang.String branch)
throws java.lang.Exception
java.lang.Exceptionpublic boolean isCommitAnalyzed(java.lang.String sha1)
public void fileTreeDiff(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.revwalk.RevCommit current,
java.util.List<java.lang.String> javaFilesBefore,
java.util.List<java.lang.String> javaFilesCurrent,
java.util.Map<java.lang.String,java.lang.String> renamedFilesHint,
boolean detectRenames,
FilePathFilter fileExtensions)
throws java.lang.Exception
java.lang.Exceptionpublic static void fileTreeDiff(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.revwalk.RevCommit commitBefore,
org.eclipse.jgit.revwalk.RevCommit commitAfter,
java.util.List<SourceFile> filesBefore,
java.util.List<SourceFile> filesAfter,
FilePathFilter fileExtensions)