|
|
@ -84,7 +84,6 @@ import org.eclipse.jgit.lib.ProgressMonitor; |
|
|
|
import org.eclipse.jgit.lib.Repository; |
|
|
|
import org.eclipse.jgit.lib.Repository; |
|
|
|
import org.eclipse.jgit.patch.FileHeader; |
|
|
|
import org.eclipse.jgit.patch.FileHeader; |
|
|
|
import org.eclipse.jgit.patch.FileHeader.PatchType; |
|
|
|
import org.eclipse.jgit.patch.FileHeader.PatchType; |
|
|
|
import org.eclipse.jgit.patch.HunkHeader; |
|
|
|
|
|
|
|
import org.eclipse.jgit.revwalk.FollowFilter; |
|
|
|
import org.eclipse.jgit.revwalk.FollowFilter; |
|
|
|
import org.eclipse.jgit.revwalk.RevTree; |
|
|
|
import org.eclipse.jgit.revwalk.RevTree; |
|
|
|
import org.eclipse.jgit.revwalk.RevWalk; |
|
|
|
import org.eclipse.jgit.revwalk.RevWalk; |
|
|
@ -100,7 +99,6 @@ import org.eclipse.jgit.treewalk.filter.NotIgnoredFilter; |
|
|
|
import org.eclipse.jgit.treewalk.filter.PathFilter; |
|
|
|
import org.eclipse.jgit.treewalk.filter.PathFilter; |
|
|
|
import org.eclipse.jgit.treewalk.filter.TreeFilter; |
|
|
|
import org.eclipse.jgit.treewalk.filter.TreeFilter; |
|
|
|
import org.eclipse.jgit.util.QuotedString; |
|
|
|
import org.eclipse.jgit.util.QuotedString; |
|
|
|
import org.eclipse.jgit.util.io.DisabledOutputStream; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Format a Git style patch script. |
|
|
|
* Format a Git style patch script. |
|
|
@ -155,7 +153,11 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
this.out = out; |
|
|
|
this.out = out; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** @return the stream we are outputting data to. */ |
|
|
|
/** |
|
|
|
|
|
|
|
* Get output stream |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return the stream we are outputting data to |
|
|
|
|
|
|
|
*/ |
|
|
|
protected OutputStream getOutputStream() { |
|
|
|
protected OutputStream getOutputStream() { |
|
|
|
return out; |
|
|
|
return out; |
|
|
|
} |
|
|
|
} |
|
|
@ -324,7 +326,11 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
return this.newPrefix; |
|
|
|
return this.newPrefix; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** @return true if rename detection is enabled. */ |
|
|
|
/** |
|
|
|
|
|
|
|
* Get if rename detection is enabled |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return true if rename detection is enabled |
|
|
|
|
|
|
|
*/ |
|
|
|
public boolean isDetectRenames() { |
|
|
|
public boolean isDetectRenames() { |
|
|
|
return renameDetector != null; |
|
|
|
return renameDetector != null; |
|
|
|
} |
|
|
|
} |
|
|
@ -348,7 +354,11 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
renameDetector = null; |
|
|
|
renameDetector = null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** @return the rename detector if rename detection is enabled. */ |
|
|
|
/** |
|
|
|
|
|
|
|
* Get rename detector |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return the rename detector if rename detection is enabled |
|
|
|
|
|
|
|
*/ |
|
|
|
public RenameDetector getRenameDetector() { |
|
|
|
public RenameDetector getRenameDetector() { |
|
|
|
return renameDetector; |
|
|
|
return renameDetector; |
|
|
|
} |
|
|
|
} |
|
|
@ -366,9 +376,10 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Set the filter to produce only specific paths. |
|
|
|
* Set the filter to produce only specific paths. |
|
|
|
* |
|
|
|
* |
|
|
|
* If the filter is an instance of {@link FollowFilter}, the filter path |
|
|
|
* If the filter is an instance of |
|
|
|
* will be updated during successive scan or format invocations. The updated |
|
|
|
* {@link org.eclipse.jgit.revwalk.FollowFilter}, the filter path will be |
|
|
|
* path can be obtained from {@link #getPathFilter()}. |
|
|
|
* updated during successive scan or format invocations. The updated path |
|
|
|
|
|
|
|
* can be obtained from {@link #getPathFilter()}. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param filter |
|
|
|
* @param filter |
|
|
|
* the tree filter to apply. |
|
|
|
* the tree filter to apply. |
|
|
@ -377,7 +388,11 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
pathFilter = filter != null ? filter : TreeFilter.ALL; |
|
|
|
pathFilter = filter != null ? filter : TreeFilter.ALL; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** @return the current path filter. */ |
|
|
|
/** |
|
|
|
|
|
|
|
* Get path filter |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return the current path filter |
|
|
|
|
|
|
|
*/ |
|
|
|
public TreeFilter getPathFilter() { |
|
|
|
public TreeFilter getPathFilter() { |
|
|
|
return pathFilter; |
|
|
|
return pathFilter; |
|
|
|
} |
|
|
|
} |
|
|
@ -385,7 +400,7 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Flush the underlying output stream of this formatter. |
|
|
|
* Flush the underlying output stream of this formatter. |
|
|
|
* |
|
|
|
* |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
* the stream's own flush method threw an exception. |
|
|
|
* the stream's own flush method threw an exception. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void flush() throws IOException { |
|
|
|
public void flush() throws IOException { |
|
|
@ -393,6 +408,8 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
|
|
|
|
* {@inheritDoc} |
|
|
|
|
|
|
|
* <p> |
|
|
|
* Release the internal ObjectReader state. |
|
|
|
* Release the internal ObjectReader state. |
|
|
|
* |
|
|
|
* |
|
|
|
* @since 4.0 |
|
|
|
* @since 4.0 |
|
|
@ -409,8 +426,8 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
* |
|
|
|
* |
|
|
|
* No output is created, instead only the file paths that are different are |
|
|
|
* No output is created, instead only the file paths that are different are |
|
|
|
* returned. Callers may choose to format these paths themselves, or convert |
|
|
|
* returned. Callers may choose to format these paths themselves, or convert |
|
|
|
* them into {@link FileHeader} instances with a complete edit list by |
|
|
|
* them into {@link org.eclipse.jgit.patch.FileHeader} instances with a |
|
|
|
* calling {@link #toFileHeader(DiffEntry)}. |
|
|
|
* complete edit list by calling {@link #toFileHeader(DiffEntry)}. |
|
|
|
* <p> |
|
|
|
* <p> |
|
|
|
* Either side may be null to indicate that the tree has beed added or |
|
|
|
* Either side may be null to indicate that the tree has beed added or |
|
|
|
* removed. The diff will be computed against nothing. |
|
|
|
* removed. The diff will be computed against nothing. |
|
|
@ -420,7 +437,7 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
* @param b |
|
|
|
* @param b |
|
|
|
* the new (or updated) side or null |
|
|
|
* the new (or updated) side or null |
|
|
|
* @return the paths that are different. |
|
|
|
* @return the paths that are different. |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
* trees cannot be read or file contents cannot be read. |
|
|
|
* trees cannot be read or file contents cannot be read. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public List<DiffEntry> scan(AnyObjectId a, AnyObjectId b) |
|
|
|
public List<DiffEntry> scan(AnyObjectId a, AnyObjectId b) |
|
|
@ -439,8 +456,8 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
* |
|
|
|
* |
|
|
|
* No output is created, instead only the file paths that are different are |
|
|
|
* No output is created, instead only the file paths that are different are |
|
|
|
* returned. Callers may choose to format these paths themselves, or convert |
|
|
|
* returned. Callers may choose to format these paths themselves, or convert |
|
|
|
* them into {@link FileHeader} instances with a complete edit list by |
|
|
|
* them into {@link org.eclipse.jgit.patch.FileHeader} instances with a |
|
|
|
* calling {@link #toFileHeader(DiffEntry)}. |
|
|
|
* complete edit list by calling {@link #toFileHeader(DiffEntry)}. |
|
|
|
* <p> |
|
|
|
* <p> |
|
|
|
* Either side may be null to indicate that the tree has beed added or |
|
|
|
* Either side may be null to indicate that the tree has beed added or |
|
|
|
* removed. The diff will be computed against nothing. |
|
|
|
* removed. The diff will be computed against nothing. |
|
|
@ -450,7 +467,7 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
* @param b |
|
|
|
* @param b |
|
|
|
* the new (or updated) side or null |
|
|
|
* the new (or updated) side or null |
|
|
|
* @return the paths that are different. |
|
|
|
* @return the paths that are different. |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
* trees cannot be read or file contents cannot be read. |
|
|
|
* trees cannot be read or file contents cannot be read. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public List<DiffEntry> scan(RevTree a, RevTree b) throws IOException { |
|
|
|
public List<DiffEntry> scan(RevTree a, RevTree b) throws IOException { |
|
|
@ -476,15 +493,15 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
* |
|
|
|
* |
|
|
|
* No output is created, instead only the file paths that are different are |
|
|
|
* No output is created, instead only the file paths that are different are |
|
|
|
* returned. Callers may choose to format these paths themselves, or convert |
|
|
|
* returned. Callers may choose to format these paths themselves, or convert |
|
|
|
* them into {@link FileHeader} instances with a complete edit list by |
|
|
|
* them into {@link org.eclipse.jgit.patch.FileHeader} instances with a |
|
|
|
* calling {@link #toFileHeader(DiffEntry)}. |
|
|
|
* complete edit list by calling {@link #toFileHeader(DiffEntry)}. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param a |
|
|
|
* @param a |
|
|
|
* the old (or previous) side. |
|
|
|
* the old (or previous) side. |
|
|
|
* @param b |
|
|
|
* @param b |
|
|
|
* the new (or updated) side. |
|
|
|
* the new (or updated) side. |
|
|
|
* @return the paths that are different. |
|
|
|
* @return the paths that are different. |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
* trees cannot be read or file contents cannot be read. |
|
|
|
* trees cannot be read or file contents cannot be read. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public List<DiffEntry> scan(AbstractTreeIterator a, AbstractTreeIterator b) |
|
|
|
public List<DiffEntry> scan(AbstractTreeIterator a, AbstractTreeIterator b) |
|
|
@ -596,7 +613,7 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
* the old (or previous) side or null |
|
|
|
* the old (or previous) side or null |
|
|
|
* @param b |
|
|
|
* @param b |
|
|
|
* the new (or updated) side or null |
|
|
|
* the new (or updated) side or null |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
* trees cannot be read, file contents cannot be read, or the |
|
|
|
* trees cannot be read, file contents cannot be read, or the |
|
|
|
* patch cannot be output. |
|
|
|
* patch cannot be output. |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -618,7 +635,7 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
* the old (or previous) side or null |
|
|
|
* the old (or previous) side or null |
|
|
|
* @param b |
|
|
|
* @param b |
|
|
|
* the new (or updated) side or null |
|
|
|
* the new (or updated) side or null |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
* trees cannot be read, file contents cannot be read, or the |
|
|
|
* trees cannot be read, file contents cannot be read, or the |
|
|
|
* patch cannot be output. |
|
|
|
* patch cannot be output. |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -639,7 +656,7 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
* the old (or previous) side or null |
|
|
|
* the old (or previous) side or null |
|
|
|
* @param b |
|
|
|
* @param b |
|
|
|
* the new (or updated) side or null |
|
|
|
* the new (or updated) side or null |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
* trees cannot be read, file contents cannot be read, or the |
|
|
|
* trees cannot be read, file contents cannot be read, or the |
|
|
|
* patch cannot be output. |
|
|
|
* patch cannot be output. |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -655,7 +672,7 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
* |
|
|
|
* |
|
|
|
* @param entries |
|
|
|
* @param entries |
|
|
|
* entries describing the affected files. |
|
|
|
* entries describing the affected files. |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
* a file's content cannot be read, or the output stream cannot |
|
|
|
* a file's content cannot be read, or the output stream cannot |
|
|
|
* be written to. |
|
|
|
* be written to. |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -669,7 +686,7 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
* |
|
|
|
* |
|
|
|
* @param ent |
|
|
|
* @param ent |
|
|
|
* the entry to be formatted. |
|
|
|
* the entry to be formatted. |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
* a file's content cannot be read, or the output stream cannot |
|
|
|
* a file's content cannot be read, or the output stream cannot |
|
|
|
* be written to. |
|
|
|
* be written to. |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -712,11 +729,13 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
* existing file header containing the header lines to copy. |
|
|
|
* existing file header containing the header lines to copy. |
|
|
|
* @param a |
|
|
|
* @param a |
|
|
|
* text source for the pre-image version of the content. This |
|
|
|
* text source for the pre-image version of the content. This |
|
|
|
* must match the content of {@link FileHeader#getOldId()}. |
|
|
|
* must match the content of |
|
|
|
|
|
|
|
* {@link org.eclipse.jgit.patch.FileHeader#getOldId()}. |
|
|
|
* @param b |
|
|
|
* @param b |
|
|
|
* text source for the post-image version of the content. This |
|
|
|
* text source for the post-image version of the content. This |
|
|
|
* must match the content of {@link FileHeader#getNewId()}. |
|
|
|
* must match the content of |
|
|
|
* @throws IOException |
|
|
|
* {@link org.eclipse.jgit.patch.FileHeader#getNewId()}. |
|
|
|
|
|
|
|
* @throws java.io.IOException |
|
|
|
* writing to the supplied stream failed. |
|
|
|
* writing to the supplied stream failed. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void format(final FileHeader head, final RawText a, final RawText b) |
|
|
|
public void format(final FileHeader head, final RawText a, final RawText b) |
|
|
@ -743,7 +762,7 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
* the text A which was compared |
|
|
|
* the text A which was compared |
|
|
|
* @param b |
|
|
|
* @param b |
|
|
|
* the text B which was compared |
|
|
|
* the text B which was compared |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void format(final EditList edits, final RawText a, final RawText b) |
|
|
|
public void format(final EditList edits, final RawText a, final RawText b) |
|
|
|
throws IOException { |
|
|
|
throws IOException { |
|
|
@ -791,7 +810,7 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
* RawText for accessing raw data |
|
|
|
* RawText for accessing raw data |
|
|
|
* @param line |
|
|
|
* @param line |
|
|
|
* the line number within text |
|
|
|
* the line number within text |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected void writeContextLine(final RawText text, final int line) |
|
|
|
protected void writeContextLine(final RawText text, final int line) |
|
|
|
throws IOException { |
|
|
|
throws IOException { |
|
|
@ -809,7 +828,7 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
* RawText for accessing raw data |
|
|
|
* RawText for accessing raw data |
|
|
|
* @param line |
|
|
|
* @param line |
|
|
|
* the line number within text |
|
|
|
* the line number within text |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected void writeAddedLine(final RawText text, final int line) |
|
|
|
protected void writeAddedLine(final RawText text, final int line) |
|
|
|
throws IOException { |
|
|
|
throws IOException { |
|
|
@ -823,7 +842,7 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
* RawText for accessing raw data |
|
|
|
* RawText for accessing raw data |
|
|
|
* @param line |
|
|
|
* @param line |
|
|
|
* the line number within text |
|
|
|
* the line number within text |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected void writeRemovedLine(final RawText text, final int line) |
|
|
|
protected void writeRemovedLine(final RawText text, final int line) |
|
|
|
throws IOException { |
|
|
|
throws IOException { |
|
|
@ -841,7 +860,7 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
* within second source |
|
|
|
* within second source |
|
|
|
* @param bEndLine |
|
|
|
* @param bEndLine |
|
|
|
* within second source |
|
|
|
* within second source |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected void writeHunkHeader(int aStartLine, int aEndLine, |
|
|
|
protected void writeHunkHeader(int aStartLine, int aEndLine, |
|
|
|
int bStartLine, int bEndLine) throws IOException { |
|
|
|
int bStartLine, int bEndLine) throws IOException { |
|
|
@ -894,7 +913,7 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
* the text object to obtain the line from. |
|
|
|
* the text object to obtain the line from. |
|
|
|
* @param cur |
|
|
|
* @param cur |
|
|
|
* line number to output. |
|
|
|
* line number to output. |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
* the stream threw an exception while writing to it. |
|
|
|
* the stream threw an exception while writing to it. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected void writeLine(final char prefix, final RawText text, |
|
|
|
protected void writeLine(final char prefix, final RawText text, |
|
|
@ -905,24 +924,26 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Creates a {@link FileHeader} representing the given {@link DiffEntry} |
|
|
|
* Creates a {@link org.eclipse.jgit.patch.FileHeader} representing the |
|
|
|
|
|
|
|
* given {@link org.eclipse.jgit.diff.DiffEntry} |
|
|
|
* <p> |
|
|
|
* <p> |
|
|
|
* This method does not use the OutputStream associated with this |
|
|
|
* This method does not use the OutputStream associated with this |
|
|
|
* DiffFormatter instance. It is therefore safe to instantiate this |
|
|
|
* DiffFormatter instance. It is therefore safe to instantiate this |
|
|
|
* DiffFormatter instance with a {@link DisabledOutputStream} if this method |
|
|
|
* DiffFormatter instance with a |
|
|
|
* is the only one that will be used. |
|
|
|
* {@link org.eclipse.jgit.util.io.DisabledOutputStream} if this method is |
|
|
|
|
|
|
|
* the only one that will be used. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param ent |
|
|
|
* @param ent |
|
|
|
* the DiffEntry to create the FileHeader for |
|
|
|
* the DiffEntry to create the FileHeader for |
|
|
|
* @return a FileHeader representing the DiffEntry. The FileHeader's buffer |
|
|
|
* @return a FileHeader representing the DiffEntry. The FileHeader's buffer |
|
|
|
* will contain only the header of the diff output. It will also |
|
|
|
* will contain only the header of the diff output. It will also |
|
|
|
* contain one {@link HunkHeader}. |
|
|
|
* contain one {@link org.eclipse.jgit.patch.HunkHeader}. |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
* the stream threw an exception while writing to it, or one of |
|
|
|
* the stream threw an exception while writing to it, or one of |
|
|
|
* the blobs referenced by the DiffEntry could not be read. |
|
|
|
* the blobs referenced by the DiffEntry could not be read. |
|
|
|
* @throws CorruptObjectException |
|
|
|
* @throws org.eclipse.jgit.errors.CorruptObjectException |
|
|
|
* one of the blobs referenced by the DiffEntry is corrupt. |
|
|
|
* one of the blobs referenced by the DiffEntry is corrupt. |
|
|
|
* @throws MissingObjectException |
|
|
|
* @throws org.eclipse.jgit.errors.MissingObjectException |
|
|
|
* one of the blobs referenced by the DiffEntry is missing. |
|
|
|
* one of the blobs referenced by the DiffEntry is missing. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public FileHeader toFileHeader(DiffEntry ent) throws IOException, |
|
|
|
public FileHeader toFileHeader(DiffEntry ent) throws IOException, |
|
|
@ -1046,12 +1067,12 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
* @param o |
|
|
|
* @param o |
|
|
|
* The stream the formatter will write the first header line to |
|
|
|
* The stream the formatter will write the first header line to |
|
|
|
* @param type |
|
|
|
* @param type |
|
|
|
* The {@link ChangeType} |
|
|
|
* The {@link org.eclipse.jgit.diff.DiffEntry.ChangeType} |
|
|
|
* @param oldPath |
|
|
|
* @param oldPath |
|
|
|
* old path to the file |
|
|
|
* old path to the file |
|
|
|
* @param newPath |
|
|
|
* @param newPath |
|
|
|
* new path to the file |
|
|
|
* new path to the file |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
* the stream threw an exception while writing to it. |
|
|
|
* the stream threw an exception while writing to it. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected void formatGitDiffFirstHeaderLine(ByteArrayOutputStream o, |
|
|
|
protected void formatGitDiffFirstHeaderLine(ByteArrayOutputStream o, |
|
|
@ -1136,11 +1157,13 @@ public class DiffFormatter implements AutoCloseable { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
|
|
|
|
* Format index line |
|
|
|
|
|
|
|
* |
|
|
|
* @param o |
|
|
|
* @param o |
|
|
|
* the stream the formatter will write line data to |
|
|
|
* the stream the formatter will write line data to |
|
|
|
* @param ent |
|
|
|
* @param ent |
|
|
|
* the DiffEntry to create the FileHeader for |
|
|
|
* the DiffEntry to create the FileHeader for |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
* writing to the supplied stream failed. |
|
|
|
* writing to the supplied stream failed. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected void formatIndexLine(OutputStream o, DiffEntry ent) |
|
|
|
protected void formatIndexLine(OutputStream o, DiffEntry ent) |
|
|
|