Modifier | Constructor and Description |
---|---|
protected |
CustomDiffCommand(Git git) |
Modifier and Type | Method and Description |
---|---|
List<org.eclipse.jgit.diff.DiffEntry> |
call()
Executes the
Diff command with all the options and parameters
collected by the setter methods (e.g. |
CustomDiffCommand |
setCached(boolean cached) |
CustomDiffCommand |
setContextLines(int contextLines)
Set number of context lines instead of the usual three.
|
CustomDiffCommand |
setDestinationPrefix(String destinationPrefix)
Set the given destination prefix instead of "b/".
|
CustomDiffCommand |
setNewTree(org.eclipse.jgit.treewalk.AbstractTreeIterator newTree) |
CustomDiffCommand |
setOldTree(org.eclipse.jgit.treewalk.AbstractTreeIterator oldTree) |
CustomDiffCommand |
setOutputStream(OutputStream out) |
CustomDiffCommand |
setPathFilter(org.eclipse.jgit.treewalk.filter.TreeFilter pathFilter) |
CustomDiffCommand |
setProgressMonitor(org.eclipse.jgit.lib.ProgressMonitor monitor)
The progress monitor associated with the diff operation.
|
CustomDiffCommand |
setShowNameAndStatusOnly(boolean showNameAndStatusOnly) |
CustomDiffCommand |
setSourcePrefix(String sourcePrefix)
Set the given source prefix instead of "a/".
|
protected CustomDiffCommand(Git git)
repo
- public List<org.eclipse.jgit.diff.DiffEntry> call() throws org.eclipse.jgit.api.errors.GitAPIException
Diff
command with all the options and parameters
collected by the setter methods (e.g. setCached(boolean)
of this
class. Each instance of this class should only be used for one invocation
of the command. Don't call this method twice on an instance.public CustomDiffCommand setCached(boolean cached)
cached
- whether to view the changes you staged for the next commitpublic CustomDiffCommand setPathFilter(org.eclipse.jgit.treewalk.filter.TreeFilter pathFilter)
pathFilter
- parameter, used to limit the diff to the named pathpublic CustomDiffCommand setOldTree(org.eclipse.jgit.treewalk.AbstractTreeIterator oldTree)
oldTree
- the previous statepublic CustomDiffCommand setNewTree(org.eclipse.jgit.treewalk.AbstractTreeIterator newTree)
newTree
- the updated statepublic CustomDiffCommand setShowNameAndStatusOnly(boolean showNameAndStatusOnly)
showNameAndStatusOnly
- whether to return only names and status of changed filespublic CustomDiffCommand setOutputStream(OutputStream out)
out
- the stream to write line datapublic CustomDiffCommand setContextLines(int contextLines)
contextLines
- the number of context linespublic CustomDiffCommand setSourcePrefix(String sourcePrefix)
sourcePrefix
- the prefixpublic CustomDiffCommand setDestinationPrefix(String destinationPrefix)
destinationPrefix
- the prefixpublic CustomDiffCommand setProgressMonitor(org.eclipse.jgit.lib.ProgressMonitor monitor)
NullProgressMonitor
monitor
- a progress monitorNullProgressMonitor
Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.