|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jgit.api.GitCommand<List<DiffEntry>> org.eclipse.jgit.api.DiffCommand
public class DiffCommand
Show changes between commits, commit and working tree, etc.
Field Summary |
---|
Fields inherited from class org.eclipse.jgit.api.GitCommand |
---|
repo |
Constructor Summary | |
---|---|
protected |
DiffCommand(Repository repo)
|
Method Summary | |
---|---|
List<DiffEntry> |
call()
Executes the Diff command with all the options and parameters
collected by the setter methods (e.g. |
DiffCommand |
setCached(boolean cached)
|
DiffCommand |
setContextLines(int contextLines)
Set number of context lines instead of the usual three. |
DiffCommand |
setDestinationPrefix(String destinationPrefix)
Set the given destination prefix instead of "b/". |
DiffCommand |
setNewTree(AbstractTreeIterator newTree)
|
DiffCommand |
setOldTree(AbstractTreeIterator oldTree)
|
DiffCommand |
setOutputStream(OutputStream out)
|
DiffCommand |
setPathFilter(TreeFilter pathFilter)
|
DiffCommand |
setProgressMonitor(ProgressMonitor monitor)
The progress monitor associated with the diff operation. |
DiffCommand |
setShowNameAndStatusOnly(boolean showNameAndStatusOnly)
|
DiffCommand |
setSourcePrefix(String sourcePrefix)
Set the given source prefix instead of "a/". |
Methods inherited from class org.eclipse.jgit.api.GitCommand |
---|
checkCallable, getRepository, setCallable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DiffCommand(Repository repo)
repo
- Method Detail |
---|
public List<DiffEntry> call() throws 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.
call
in interface Callable<List<DiffEntry>>
call
in class GitCommand<List<DiffEntry>>
GitAPIException
- or subclass thereof when an error occurspublic DiffCommand setCached(boolean cached)
cached
- whether to view the changes you staged for the next commit
public DiffCommand setPathFilter(TreeFilter pathFilter)
pathFilter
- parameter, used to limit the diff to the named path
public DiffCommand setOldTree(AbstractTreeIterator oldTree)
oldTree
- the previous state
public DiffCommand setNewTree(AbstractTreeIterator newTree)
newTree
- the updated state
public DiffCommand setShowNameAndStatusOnly(boolean showNameAndStatusOnly)
showNameAndStatusOnly
- whether to return only names and status of changed files
public DiffCommand setOutputStream(OutputStream out)
out
- the stream to write line data
public DiffCommand setContextLines(int contextLines)
contextLines
- the number of context lines
public DiffCommand setSourcePrefix(String sourcePrefix)
sourcePrefix
- the prefix
public DiffCommand setDestinationPrefix(String destinationPrefix)
destinationPrefix
- the prefix
public DiffCommand setProgressMonitor(ProgressMonitor monitor)
NullProgressMonitor
monitor
- a progress monitor
NullProgressMonitor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |