| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private int | |
| private boolean | |
| private RawTextComparator | |
| private int | |
| private static final int | |
| private DiffAlgorithm | |
| private DiffConfig | |
| private static final byte[] | EMPTY
Magic return content indicating it is empty or no content present. |
| private String | |
| private static final byte[] | |
| private String | |
| private final OutputStream | |
| private TreeFilter | |
| private ProgressMonitor | |
| private Boolean | |
| private ObjectReader | |
| private RenameDetector | |
| private Repository | |
| private ContentSource. |
| Access | Constructor and Description |
|---|---|
| public | DiffFormatter(OutputStream
the stream the formatter will write line data to. This stream
should have buffering arranged by the caller, as many small
writes are performed to it. out)Create a new formatter with a default level of context. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | close()
Implements java. Closes this resource, relinquishing any underlying resources. |
| private boolean | |
| private boolean | |
| private DiffFormatter. | |
| private List | |
| private EditList | |
| private static boolean | |
| private int | |
| public void | |
| public void | format(AnyObjectId
the old (or previous) side or null a, AnyObjectId the new (or updated) side or null b)Format the differences between two trees. |
| public void | |
| public void | format(AbstractTreeIterator
the old (or previous) side or null a, AbstractTreeIterator the new (or updated) side or null b)Format the differences between two trees. |
| public void | |
| public void | |
| private String | |
| public void | format(FileHeader
existing file header containing the header lines to copy. head, RawText text source for the pre-image version of the content. This
must match the content of
a, RawText org..text source for the post-image version of the content. This
must match the content of
b, DiffDriver org..the diff driver used to obtain function names in hunk headers diffDriver)Format a patch script, reusing a previously parsed FileHeader. |
| public void | format(FileHeader
existing file header containing the header lines to copy. head, RawText text source for the pre-image version of the content. This must match
the content of a, RawText org..text source for the post-image version of the content. This must match
the content of b)org..Format a patch script, reusing a previously parsed FileHeader. |
| public void | |
| public void | format(EditList
some differences which have been calculated between A and B edits, RawText the text A which was compared a, RawText the text B which was compared b, DiffDriver the diff driver used to obtain function names in hunk headers diffDriver)Formats a list of edits in unified diff format |
| protected void | formatGitDiffFirstHeaderLine(ByteArrayOutputStream
The stream the formatter will write the first header line to o, final DiffEntry.old path to the file oldPath, final String new path to the file newPath)Output the first header line |
| private void | |
| protected void | formatIndexLine(OutputStream
the stream the formatter will write line data to o, DiffEntry the DiffEntry to create the FileHeader for ent)Format index line |
| private void | |
| private DiffDriver | |
| private static TreeFilter | |
| private String | |
| public String | |
| public String | |
| protected OutputStream | |
| public TreeFilter | |
| public RenameDetector | |
| private boolean | |
| public boolean | |
| private static boolean | |
| private static boolean | |
| private AbstractTreeIterator | |
| private boolean | |
| private RawText | |
| private String | |
| public List | Returns: the paths that are different.the old (or previous) side or null a, AnyObjectId the new (or updated) side or null b)Determine the differences between two trees. |
| public List | |
| public List | Returns: the paths that are different.the old (or previous) side. a, AbstractTreeIterator the new (or updated) side. b)Determine the differences between two trees. |
| public void | setAbbreviationLength(int
number of digits to show in an ObjectId. count)Change the number of digits to show in an ObjectId. |
| public void | setBinaryFileThreshold(int
the limit, in bytes. Files larger than this size will be
assumed to be binary, even if they aren't. threshold)Set maximum file size for text files. |
| public void | setContext(int
number of lines of context to see before the first
modification and after the last modification within a hunk of
the modified file. lineCount)Change the number of lines of context to display. |
| public void | setDetectRenames(boolean
if rename detection should be enabled. on)Enable or disable rename detection. |
| public void | setDiffAlgorithm(DiffAlgorithm
the algorithm to produce text file differences. alg)Set the algorithm that constructs difference output. |
| public void | setDiffComparator(RawTextComparator
The equivalence function used to determine if two lines of
text are identical. The function can be changed to ignore
various types of whitespace. cmp)Set the line equivalence function for text file differences. |
| public void | setNewPrefix(String
the prefix in front of new paths. Typically this is the
standard string prefix)"b/", but may be any prefix desired by
the caller. Must not be null. Use the empty string to have no
prefix at all.Set the prefix applied in front of new file paths. |
| public void | setOldPrefix(String
the prefix in front of old paths. Typically this is the
standard string prefix)"a/", but may be any prefix desired by
the caller. Must not be null. Use the empty string to have no
prefix at all.Set the prefix applied in front of old file paths. |
| public void | setPathFilter(TreeFilter
the tree filter to apply. filter)Set the filter to produce only specific paths. |
| public void | setProgressMonitor(ProgressMonitor
progress monitor to receive rename detection status through. pm)Set the progress monitor for long running rename detection. |
| public void | setQuotePaths(boolean
whether to quote path names quote)Sets whether or not path names should be quoted. |
| public void | setReader(ObjectReader
source reader holding referenced objects. Caller is responsible
for closing the reader. reader, Config config specifying diff algorithm and rename detection options. cfg)Set the repository the formatter can load object contents from. |
| private void | |
| public void | setRepository(Repository
source repository holding referenced objects. repository)Set the repository the formatter can load object contents from. |
| private ContentSource | |
| public FileHeader | Returns: a FileHeader representing the DiffEntry. The FileHeader's buffer will contain only the header of the diff output. It will also contain oneorg..the DiffEntry to create the FileHeader for ent)Creates a This method does not use the OutputStream associated with this DiffFormatter instance. |
| private List | |
| protected void | writeAddedLine(RawText
RawText for accessing raw data text, int the line number within text line)Output an added line. |
| protected void | writeContextLine(RawText
RawText for accessing raw data text, int the line number within text line)Output a line of context (unmodified line). |
| private static byte[] | |
| protected void | writeHunkHeader(int
within first source aStartLine, int within first source aEndLine, int within second source bStartLine, int within second source bEndLine)Output a hunk header |
| protected void | writeHunkHeader(int
within first source aStartLine, int within first source aEndLine, int within second source bStartLine, int within second source bEndLine, String function name of this hunk funcName)Output a hunk header |
| protected void | |
| private void | |
| protected void | writeRemovedLine(RawText
RawText for accessing raw data text, int the line number within text line)Output a removed line |