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.
FileHeader.PatchTypeDiffEntry.ChangeType, DiffEntry.Side| Modifier and Type | Field and Description |
|---|---|
private static byte[] |
MODE |
private AbbreviatedObjectId[] |
oldIds |
private FileMode[] |
oldModes |
buf, DELETED_FILE_MODE, endOffset, forwardBinaryHunk, INDEX, NEW_FILE_MODE, NEW_NAME, OLD_NAME, patchType, reverseBinaryHunk, startOffset| Constructor and Description |
|---|
CombinedFileHeader(byte[] b,
int offset) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<? extends CombinedHunkHeader> |
getHunks()
Get hunks altering this file; in order of appearance in patch
|
AbbreviatedObjectId |
getOldId()
Get the old object id from the
index. |
AbbreviatedObjectId |
getOldId(int nthParent)
Get the ObjectId of the nth ancestor
|
FileMode |
getOldMode()
Get the old file mode
|
FileMode |
getOldMode(int nthParent)
Get the file mode of the nth ancestor
|
int |
getParentCount() |
java.lang.String |
getScriptText(java.nio.charset.Charset[] charsetGuess) |
java.lang.String |
getScriptText(java.nio.charset.Charset ocs,
java.nio.charset.Charset ncs)
Convert the patch script for this file into a string.
|
(package private) HunkHeader |
newHunkHeader(int offset) |
private void |
parseDeletedFileMode(int ptr,
int eol) |
(package private) int |
parseGitHeaders(int ptr,
int end) |
protected void |
parseIndexLine(int ptr,
int eol) |
private void |
parseModeLine(int ptr,
int eol) |
protected void |
parseNewFileMode(int ptr,
int eol) |
addHunk, getBuffer, getEndOffset, getForwardBinaryHunk, getPatchType, getReverseBinaryHunk, getScriptText, getStartOffset, hasMetaDataChanges, isHunkHdr, parseFileMode, parseGitFileName, parseNewName, parseOldName, parseTraditionalHeaders, toEditListgetChangeType, getDiffAttribute, getId, getMode, getNewId, getNewMode, getNewPath, getOldPath, getPath, getScore, getTreeFilterMarks, isMarked, scan, scan, scan, toStringprivate static final byte[] MODE
private AbbreviatedObjectId[] oldIds
private FileMode[] oldModes
public java.util.List<? extends CombinedHunkHeader> getHunks()
getHunks in class FileHeaderpublic int getParentCount()
getParentCount in class FileHeaderpublic FileMode getOldMode()
getOldMode in class DiffEntrypublic FileMode getOldMode(int nthParent)
nthParent - the ancestor to get the mode ofpublic AbbreviatedObjectId getOldId()
index.
public AbbreviatedObjectId getOldId(int nthParent)
nthParent - the ancestor to get the object id ofpublic java.lang.String getScriptText(java.nio.charset.Charset ocs,
java.nio.charset.Charset ncs)
getScriptText in class FileHeaderocs - hint character set to decode the old lines with.ncs - hint character set to decode the new lines with.public java.lang.String getScriptText(java.nio.charset.Charset[] charsetGuess)
Convert the patch script for this file into a string.
getScriptText in class FileHeaderint parseGitHeaders(int ptr,
int end)
parseGitHeaders in class FileHeaderprotected void parseIndexLine(int ptr,
int eol)
parseIndexLine in class FileHeaderprotected void parseNewFileMode(int ptr,
int eol)
parseNewFileMode in class FileHeaderHunkHeader newHunkHeader(int offset)
newHunkHeader in class FileHeaderprivate void parseModeLine(int ptr,
int eol)
private void parseDeletedFileMode(int ptr,
int eol)