public class BlameCommand extends GitCommand<BlameResult>
BlameResult for a
file path.repo| Constructor and Description |
|---|
BlameCommand(Repository repo)
Constructor for BlameCommand
|
| Modifier and Type | Method and Description |
|---|---|
BlameResult |
call() |
BlameCommand |
reverse(AnyObjectId start,
AnyObjectId end)
Configure the command to compute reverse blame (history of deletes).
|
BlameCommand |
reverse(AnyObjectId start,
Collection<ObjectId> end)
Configure the generator to compute reverse blame (history of deletes).
|
BlameCommand |
setDiffAlgorithm(DiffAlgorithm diffAlgorithm)
Set diff algorithm
|
BlameCommand |
setFilePath(String filePath)
Set file path.
|
BlameCommand |
setFollowFileRenames(boolean follow)
Enable (or disable) following file renames.
|
BlameCommand |
setStartCommit(AnyObjectId commit)
Set start commit id
|
BlameCommand |
setTextComparator(RawTextComparator textComparator)
Set raw text comparator
|
checkCallable, getRepository, setCallablepublic BlameCommand(Repository repo)
repo - the Repositorypublic BlameCommand setFilePath(String filePath)
filePath - file path (with / as separator)public BlameCommand setDiffAlgorithm(DiffAlgorithm diffAlgorithm)
diffAlgorithm - a DiffAlgorithm object.public BlameCommand setTextComparator(RawTextComparator textComparator)
textComparator - a RawTextComparatorpublic BlameCommand setStartCommit(AnyObjectId commit)
commit - id of a commitpublic BlameCommand setFollowFileRenames(boolean follow)
If true renames are followed using the standard FollowFilter behavior
used by RevWalk (which matches git log --follow in the C
implementation). This is not the same as copy/move detection as
implemented by the C implementation's of git blame -M -C.
follow - enable following.thispublic BlameCommand reverse(AnyObjectId start, AnyObjectId end) throws IOException
start - oldest commit to traverse from. The result file will be loaded
from this commit's tree.end - most recent commit to stop traversal at. Usually an active
branch tip, tag, or HEAD.thisIOException - the repository cannot be read.public BlameCommand reverse(AnyObjectId start, Collection<ObjectId> end) throws IOException
start - oldest commit to traverse from. The result file will be loaded
from this commit's tree.end - most recent commits to stop traversal at. Usually an active
branch tip, tag, or HEAD.thisIOException - the repository cannot be read.public BlameResult call() throws GitAPIException
Execute the command
Generate a list of lines with information about when the lines were introduced into the file path.
call in interface Callable<BlameResult>call in class GitCommand<BlameResult>GitAPIExceptionCopyright © 2021 Eclipse JGit Project. All rights reserved.