public class CombinedFileHeader extends FileHeader
A combined diff shows an n-way comparison between two or more ancestors and the final revision. Its primary function is to perform code reviews on a merge which introduces changes not in any ancestor.
DiffEntry.ChangeType, DiffEntry.SideFileHeader.PatchType| Modifier and Type | Method | Description |
|---|---|---|
List<? extends CombinedHunkHeader> |
getHunks() |
|
AbbreviatedObjectId |
getOldId() |
Get the old object id from the
index. |
AbbreviatedObjectId |
getOldId(int nthParent) |
Get the ObjectId of the nth ancestor
|
FileMode |
getOldMode() |
|
FileMode |
getOldMode(int nthParent) |
Get the file mode of the nth ancestor
|
int |
getParentCount() |
|
String |
getScriptText(Charset[] charsetGuess) |
Convert the patch script for this file into a string.
|
String |
getScriptText(Charset ocs,
Charset ncs) |
Convert the patch script for this file into a string.
|
protected void |
parseIndexLine(int ptr,
int eol) |
|
protected void |
parseNewFileMode(int ptr,
int eol) |
getChangeType, getId, getMode, getNewId, getNewMode, getNewPath, getOldPath, getPath, getScore, getTreeFilterMarks, isMarked, scan, scan, scan, toStringgetBuffer, getEndOffset, getForwardBinaryHunk, getPatchType, getReverseBinaryHunk, getScriptText, getStartOffset, hasMetaDataChanges, toEditListpublic List<? extends CombinedHunkHeader> getHunks()
getHunks in class FileHeaderpublic int getParentCount()
public FileMode getOldMode()
getOldMode in class DiffEntrypublic FileMode getOldMode(int nthParent)
nthParent - the ancestor to get the mode ofpublic AbbreviatedObjectId getOldId()
DiffEntryindex.public AbbreviatedObjectId getOldId(int nthParent)
nthParent - the ancestor to get the object id ofpublic String getScriptText(Charset ocs, Charset ncs)
FileHeadergetScriptText in class FileHeaderocs - hint character set to decode the old lines with.ncs - hint character set to decode the new lines with.public String getScriptText(Charset[] charsetGuess)
charsetGuess - optional array to suggest the character set to use when
decoding each file's line. If supplied the array must have a
length of getParentCount() + 1
representing the old revision character sets and the new
revision character set.protected void parseIndexLine(int ptr,
int eol)
protected void parseNewFileMode(int ptr,
int eol)
Copyright © 2018. All rights reserved.