|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.jgit.diff.DiffFormatter
public class DiffFormatter
Format an EditList as a Git style unified patch script.
| Constructor Summary | |
|---|---|
DiffFormatter()
Create a new formatter with a default level of context. |
|
| Method Summary | |
|---|---|
void |
format(java.io.OutputStream out,
FileHeader head,
RawText a,
RawText b)
Format a patch script, reusing a previously parsed FileHeader. |
void |
setContext(int lineCount)
Change the number of lines of context to display. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DiffFormatter()
| Method Detail |
|---|
public void setContext(int lineCount)
lineCount - number of lines of context to see before the first
modification and after the last modification within a hunk of
the modified file.
public void format(java.io.OutputStream out,
FileHeader head,
RawText a,
RawText b)
throws java.io.IOException
This formatter is primarily useful for editing an existing patch script to increase or reduce the number of lines of context within the script. All header lines are reused as-is from the supplied FileHeader.
out - stream to write the patch script out to.head - existing file header containing the header lines to copy.a - text source for the pre-image version of the content. This
must match the content of FileHeader.getOldId().b - text source for the post-image version of the content. This
must match the content of FileHeader.getNewId().
java.io.IOException - writing to the supplied stream failed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||