Top Inners Fields Constructors Methods
org.eclipse.jgit.pgm

pack-priv Class DiffTool

extends TextBuiltin
Class Inheritance
Annotations
@Command
name:difftool
common:true
usage:usage_DiffTool
Static Imports
org.eclipse.jgit.lib.Constants.HEAD, org.eclipse.jgit.treewalk.TreeWalk.OperationType.CHECKOUT_OP

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private boolean
private DiffFormatter
private DiffTools
private boolean
private BufferedReader
private AbstractTreeIterator
private AbstractTreeIterator
private TreeFilter
private BooleanTriState
private boolean
private Optional<String>
private BooleanTriState
Inherited from org.eclipse.jgit.pgm.TextBuiltin:
argWalkdberrserrwgitdirinsoutsoutw

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
private FileElement
private List<DiffEntry>
private void
protected void
init(Repository
the opened repository that the command should work on.
repository
,
String
value of the --git-dir command line option, if repository is null.
gitDir
)

Overrides org.eclipse.jgit.pgm.TextBuiltin.init.

Initialize the command to work with a repository.

pack-priv void
noGui(boolean on)

pack-priv void
noPrompt(boolean on)

pack-priv void
noTrustExitCode(boolean on)

protected void
run()

Implements abstract org.eclipse.jgit.pgm.TextBuiltin.run.

Perform the actions of this command.

pack-priv void
setGui(boolean on)

pack-priv void
setPrompt(boolean on)

pack-priv void
pack-priv void
setTrustExitCode(boolean on)

private void
private ContentSource
Inherited from org.eclipse.jgit.pgm.TextBuiltin:
abbreviateRefcontainsHelpdiediediedieexecutegetErrorWritergetOutputWritergetRepositorygetResourceBundleinitRawparseArgumentsprintUsageprintUsageAndExitprintUsageAndExitrequiresRepositoryresolvesetCommandName

Field Detail

cachedback to summary
private boolean cached
Annotations
@Option
name:--cached
aliases:--staged
usage:usage_cached
diffFmtback to summary
private DiffFormatter diffFmt
diffToolsback to summary
private DiffTools diffTools
guiback to summary
private boolean gui
inputReaderback to summary
private BufferedReader inputReader
newTreeback to summary
private AbstractTreeIterator newTree
Annotations
@Argument
index:1
metaVar:metaVar_treeish
oldTreeback to summary
private AbstractTreeIterator oldTree
Annotations
@Argument
index:0
metaVar:metaVar_treeish
pathFilterback to summary
private TreeFilter pathFilter
Annotations
@Option
name:--
metaVar:metaVar_paths
handler:PathTreeFilterHandler
promptback to summary
private BooleanTriState prompt
toolHelpback to summary
private boolean toolHelp
Annotations
@Option
name:--tool-help
usage:usage_toolHelp
toolNameback to summary
private Optional<String> toolName
trustExitCodeback to summary
private BooleanTriState trustExitCode

Constructor Detail

DiffToolback to summary
pack-priv DiffTool()

Method Detail

compareback to summary
private void compare(List<DiffEntry> files) throws IOException
createFileElementback to summary
private FileElement createFileElement(FileElement.Type elementType, ContentSource.Pair pair, DiffEntry.Side side, DiffEntry entry) throws NoWorkTreeException, CorruptObjectException, IOException, ToolException
getFilesback to summary
private List<DiffEntry> getFiles() throws RevisionSyntaxException, AmbiguousObjectException, IncorrectObjectTypeException, IOException
informUserNoToolback to summary
private void informUserNoTool(List<String> tools)
initback to summary
protected void init(Repository repository, String gitDir)

Overrides org.eclipse.jgit.pgm.TextBuiltin.init.

Doc from org.eclipse.jgit.pgm.TextBuiltin.init.

Initialize the command to work with a repository.

Parameters
repository:Repository

the opened repository that the command should work on.

gitDir:String

value of the --git-dir command line option, if repository is null.

Annotations
@Override
noGuiback to summary
pack-priv void noGui(boolean on)
Annotations
@Option
name:--no-gui
usage:usage_noGui
noPromptback to summary
pack-priv void noPrompt(boolean on)
Annotations
@Option
name:--no-prompt
aliases:-y
usage:usage_noPrompt
noTrustExitCodeback to summary
pack-priv void noTrustExitCode(boolean on)
Annotations
@Option
name:--no-trust-exit-code
usage:usage_noTrustExitCode
runback to summary
protected void run()

Implements abstract org.eclipse.jgit.pgm.TextBuiltin.run.

Doc from org.eclipse.jgit.pgm.TextBuiltin.run.

Perform the actions of this command.

This method should only be invoked by execute(String[]).

Annotations
@Override
setGuiback to summary
pack-priv void setGui(boolean on)
Annotations
@Option
name:--gui
aliases:-g
usage:usage_DiffGuiTool
setPromptback to summary
pack-priv void setPrompt(boolean on)
Annotations
@Option
name:--prompt
usage:usage_prompt
setToolNameback to summary
pack-priv void setToolName(String name)
Annotations
@Option
name:--tool
aliases:-t
metaVar:metaVar_tool
usage:usage_ToolForDiff
setTrustExitCodeback to summary
pack-priv void setTrustExitCode(boolean on)
Annotations
@Option
name:--trust-exit-code
usage:usage_trustExitCode
showToolHelpback to summary
private void showToolHelp() throws IOException
sourceback to summary
private ContentSource source(AbstractTreeIterator iterator)
org.eclipse.jgit.pgm back to summary

private Class DiffTool.CountingPromptContinueHandler

extends Object
implements PromptContinueHandler
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.internal.diffmergetool.PromptContinueHandler

Field Summary

Modifier and TypeField and Description
private final int
private final int
private final String

Constructor Summary

AccessConstructor and Description
public
CountingPromptContinueHandler(int fileIndex, int fileCount, String fileName)

Method Summary

Modifier and TypeMethod and Description
public boolean
prompt(String
The name of the tool to open
toolToLaunchName
)

Implements org.eclipse.jgit.internal.diffmergetool.PromptContinueHandler.prompt.

Prompt the user whether to continue with the next file by opening a given tool.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fileCountback to summary
private final int fileCount
fileIndexback to summary
private final int fileIndex
fileNameback to summary
private final String fileName

Constructor Detail

CountingPromptContinueHandlerback to summary
public CountingPromptContinueHandler(int fileIndex, int fileCount, String fileName)

Method Detail

promptback to summary
public boolean prompt(String toolToLaunchName)

Implements org.eclipse.jgit.internal.diffmergetool.PromptContinueHandler.prompt.

Doc from org.eclipse.jgit.internal.diffmergetool.PromptContinueHandler.prompt.

Prompt the user whether to continue with the next file by opening a given tool.

Parameters
toolToLaunchName:String

The name of the tool to open

Returns:boolean

Whether the user wants to continue

Annotations
@SuppressWarnings:boxing
@Override