public class PatchList extends Object implements Serializable
Constructor and Description |
---|
PatchList(org.eclipse.jgit.lib.AnyObjectId oldId,
org.eclipse.jgit.lib.AnyObjectId newId,
boolean isMerge,
ComparisonType comparisonType,
PatchListEntry[] patches) |
Modifier and Type | Method and Description |
---|---|
PatchListEntry |
get(String fileName)
Find an entry by name, returning an empty entry if not present.
|
ComparisonType |
getComparisonType() |
int |
getDeletions() |
int |
getInsertions() |
org.eclipse.jgit.lib.ObjectId |
getNewId()
New side commit.
|
org.eclipse.jgit.lib.ObjectId |
getOldId()
Old side tree or commit; null only if this is a combined diff.
|
List<PatchListEntry> |
getPatches()
Get a sorted, unmodifiable list of all files in this list.
|
List<Patch> |
toPatchList(PatchSet.Id setId)
Get a sorted, modifiable list of all files in this list.
|
public PatchList(org.eclipse.jgit.lib.AnyObjectId oldId, org.eclipse.jgit.lib.AnyObjectId newId, boolean isMerge, ComparisonType comparisonType, PatchListEntry[] patches)
public org.eclipse.jgit.lib.ObjectId getOldId()
public org.eclipse.jgit.lib.ObjectId getNewId()
public List<PatchListEntry> getPatches()
public ComparisonType getComparisonType()
public int getInsertions()
public int getDeletions()
public List<Patch> toPatchList(PatchSet.Id setId)
The returned list items do not populate:
setId
- the patch set identity these patches belong to. This really should not need to be
specified, but is a current legacy artifact of how the cache is keyed versus how the
database is keyed.public PatchListEntry get(String fileName)