public class CommitFinder extends RepositoryService
TreeFilter and RevFilter instances and performing a
RevWalk on one or more Git repositories.| Modifier and Type | Field and Description |
|---|---|
protected org.eclipse.jgit.revwalk.filter.RevFilter |
commitFilter
Commit filter for selecting commits to match
|
protected org.eclipse.jgit.revwalk.RevSort |
sort
Sort strategy for
RevWalk |
protected org.eclipse.jgit.treewalk.filter.TreeFilter |
treeFilter
Tree filter for selecting commits to match
|
repositories| Constructor and Description |
|---|
CommitFinder(Collection<?> repositories)
Create a commit finder for th given repository collection
|
CommitFinder(File... gitDirs)
Create a commit finder for the given Git directories.
|
CommitFinder(org.eclipse.jgit.lib.Repository... repositories)
Create a commit finder for the given Git repositories.
|
CommitFinder(String... gitDirs)
Create a commit finder for the given Git directory paths.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.eclipse.jgit.revwalk.RevWalk |
createWalk(org.eclipse.jgit.lib.Repository repository)
Create a newly configured
RevWalk for the repository |
CommitFinder |
find()
Search the commits starting at the commit that HEAD current references.
|
CommitFinder |
findBetween(org.eclipse.jgit.lib.ObjectId start,
org.eclipse.jgit.lib.ObjectId end)
Search the commits between the given start and end commits.
|
CommitFinder |
findBetween(org.eclipse.jgit.lib.ObjectId start,
String end)
Search the commits between the given start commit id and the given end
revision.
|
CommitFinder |
findBetween(String start,
org.eclipse.jgit.lib.ObjectId end)
Search the commits between the given start revision and the given end
commit id.
|
CommitFinder |
findBetween(String start,
String end)
Search the commits between the given start revision and the given end
revision.
|
CommitFinder |
findFrom(org.eclipse.jgit.lib.ObjectId start)
Search the commits starting from the given commit id.
|
CommitFinder |
findFrom(String start)
Search the commits starting from the given revision.
|
CommitFinder |
findInBranches()
Search the commits starting at the commit that each branch is
referencing.
|
CommitFinder |
findInTags()
Search the commits starting at the commit that each tag is referencing.
|
CommitFinder |
findUntil(org.eclipse.jgit.lib.ObjectId end)
Search the commits starting at HEAD and ending with the given commit id
|
CommitFinder |
findUntil(String end)
Search the commits starting at HEAD and ending with the given revision
|
CommitFinder |
setFilter(org.eclipse.jgit.revwalk.filter.RevFilter filter)
Set the
RevFilter to use to filter commits during searches. |
CommitFinder |
setFilter(org.eclipse.jgit.treewalk.filter.TreeFilter filter)
Set the
TreeFilter to use to limit commits visited. |
protected CommitFinder |
walk(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.lib.ObjectId start,
org.eclipse.jgit.lib.ObjectId end)
Walk the commits between the start commit id and end commit id.
|
protected CommitFinder |
walk(org.eclipse.jgit.revwalk.RevWalk walk)
Traverse the commits in the given
RevWalk |
protected org.eclipse.jgit.revwalk.filter.RevFilter commitFilter
protected org.eclipse.jgit.treewalk.filter.TreeFilter treeFilter
protected org.eclipse.jgit.revwalk.RevSort sort
RevWalkpublic CommitFinder(File... gitDirs)
gitDirs - public CommitFinder(org.eclipse.jgit.lib.Repository... repositories)
repositories - public CommitFinder(String... gitDirs)
gitDirs - public CommitFinder(Collection<?> repositories)
repositories - public CommitFinder setFilter(org.eclipse.jgit.revwalk.filter.RevFilter filter)
RevFilter to use to filter commits during searches.filter - public CommitFinder setFilter(org.eclipse.jgit.treewalk.filter.TreeFilter filter)
TreeFilter to use to limit commits visited.filter - protected org.eclipse.jgit.revwalk.RevWalk createWalk(org.eclipse.jgit.lib.Repository repository)
RevWalk for the repositoryrepository - RevWalkprotected CommitFinder walk(org.eclipse.jgit.revwalk.RevWalk walk) throws IOException
RevWalkwalk - IOExceptionprotected CommitFinder walk(org.eclipse.jgit.lib.Repository repository, org.eclipse.jgit.lib.ObjectId start, org.eclipse.jgit.lib.ObjectId end)
repository - start - must be non-nullend - public CommitFinder findFrom(org.eclipse.jgit.lib.ObjectId start)
start - public CommitFinder findFrom(String start)
start - public CommitFinder find()
public CommitFinder findInTags()
Repositories that have no tags will be ignored.
public CommitFinder findInBranches()
Repositories that have no branches will be ignored.
public CommitFinder findBetween(org.eclipse.jgit.lib.ObjectId start, org.eclipse.jgit.lib.ObjectId end)
start - end - public CommitFinder findBetween(String start, org.eclipse.jgit.lib.ObjectId end)
start - end - public CommitFinder findBetween(org.eclipse.jgit.lib.ObjectId start, String end)
start - end - public CommitFinder findBetween(String start, String end)
start - end - public CommitFinder findUntil(String end)
end - public CommitFinder findUntil(org.eclipse.jgit.lib.ObjectId end)
end - Copyright © 2011-2015. All Rights Reserved.