| Modifier and Type | Class and Description |
|---|---|
| public static enum | DiffEntry.
General type of change a single file-level patch describes. |
| public static enum | DiffEntry.
Specify the old or new side for more generalized access. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final AbbreviatedObjectId | A_ZERO
Magical SHA1 used for file adds or deletes |
| protected DiffEntry. | changeType
General type of change indicated by the patch. |
| public static final String | DEV_NULL
Magical file name used for file adds or deletes. |
| protected Attribute | diffAttribute
diff filter attribute |
| protected AbbreviatedObjectId | newId
ObjectId listed on the index line for the new (post-image) |
| protected FileMode | newMode
New mode of the file, if described by the patch, else null. |
| protected String | newPath
File name of the new (post-image). |
| protected AbbreviatedObjectId | oldId
ObjectId listed on the index line for the old (pre-image) |
| protected FileMode | oldMode
Old mode of the file, if described by the patch, else null. |
| protected String | oldPath
File name of the old (pre-image). |
| protected int | score
Similarity score if |
| private int | treeFilterMarks
Bitset for marked flags of tree filters passed to
|
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static DiffEntry | |
| pack-priv static List | Returns: a list containing two entries. CallinggetChangeType()
on the first entry will return ChangeType.DELETE. Calling it on
the second entry will return ChangeType.ADD.the DiffEntry to break apart. entry)Breaks apart a DiffEntry into two entries, one DELETE and one ADD. |
| pack-priv static DiffEntry | |
| public DiffEntry. | |
| public Attribute | |
| public AbbreviatedObjectId | |
| public FileMode | |
| public AbbreviatedObjectId | Returns: the object id; null if there is no index lineGet the new object id from the |
| public FileMode | |
| public String | |
| public AbbreviatedObjectId | Returns: the object id; null if there is no index lineGet the old object id from the |
| public FileMode | |
| public String | |
| public String | |
| public int | Returns: similarity score betweengetOldPath() and
getNewPath() if getChangeType() is
org. or
org..Get similarity score |
| public int | Returns: the bitset of tree filter marksGet the raw tree filter marks, as set during
|
| public boolean | Returns: a boolean.the index of the tree filter to check for (must be between 0
and index)java.).Whether the mark tree filter with the specified index matched during scan
or not, see |
| pack-priv static DiffEntry | |
| pack-priv static DiffEntry | |
| public static List | |
| public static List | Returns: headers describing the changed files.the TreeWalk to walk through. Must have exactly two trees and
when walk, boolean includeTrees parameter is true it can't
be recursive.include tree objects. includeTrees)Convert the TreeWalk into DiffEntry headers, depending on
|
| public static List | Returns: headers describing the changed files.the TreeWalk to walk through. Must have exactly two trees and
when walk, boolean includeTrees parameter is true it can't
be recursive.include tree objects. includeTrees, TreeFilter[] array of tree filters which will be tested for each entry. If
an entry matches, the entry will later return true when
queried through { markTreeFilters)isMarked(int) (with the index from
this passed array).Convert the TreeWalk into DiffEntry headers, depending on
|
| public String |
| A_ZERO | back to summary |
|---|---|
| pack-priv static final AbbreviatedObjectId A_ZERO Magical SHA1 used for file adds or deletes | |
| changeType | back to summary |
|---|---|
| protected DiffEntry. General type of change indicated by the patch. | |
| DEV_NULL | back to summary |
|---|---|
| public static final String DEV_NULL Magical file name used for file adds or deletes. | |
| diffAttribute | back to summary |
|---|---|
| protected Attribute diffAttribute diff filter attribute
| |
| newId | back to summary |
|---|---|
| protected AbbreviatedObjectId newId ObjectId listed on the index line for the new (post-image) | |
| newMode | back to summary |
|---|---|
| protected FileMode newMode New mode of the file, if described by the patch, else null. | |
| newPath | back to summary |
|---|---|
| protected String newPath File name of the new (post-image). | |
| oldId | back to summary |
|---|---|
| protected AbbreviatedObjectId oldId ObjectId listed on the index line for the old (pre-image) | |
| oldMode | back to summary |
|---|---|
| protected FileMode oldMode Old mode of the file, if described by the patch, else null. | |
| oldPath | back to summary |
|---|---|
| protected String oldPath File name of the old (pre-image). | |
| score | back to summary |
|---|---|
| protected int score Similarity score if | |
| treeFilterMarks | back to summary |
|---|---|
| private int treeFilterMarks Bitset for marked flags of tree filters passed to
| |
| DiffEntry | back to summary |
|---|---|
| protected DiffEntry() Create an empty DiffEntry | |
| add | back to summary |
|---|---|
| pack-priv static DiffEntry add(String path, AnyObjectId id) | |
| breakModify | back to summary |
|---|---|
| pack-priv static List Breaks apart a DiffEntry into two entries, one DELETE and one ADD.
| |
| delete | back to summary |
|---|---|
| pack-priv static DiffEntry delete(String path, AnyObjectId id) | |
| getChangeType | back to summary |
|---|---|
| public DiffEntry. Get the change type
| |
| getDiffAttribute | back to summary |
|---|---|
| public Attribute getDiffAttribute() Get diff attribute | |
| getId | back to summary |
|---|---|
| public AbbreviatedObjectId getId(DiffEntry. Get the object id.
| |
| getMode | back to summary |
|---|---|
| public FileMode getMode(DiffEntry. Get the mode associated with this file. | |
| getNewId | back to summary |
|---|---|
| public AbbreviatedObjectId getNewId() Get the new object id from the
| |
| getNewMode | back to summary |
|---|---|
| public FileMode getNewMode() Get the new file mode
| |
| getNewPath | back to summary |
|---|---|
| public String getNewPath() Get the new name associated with this file. The meaning of the new name can differ depending on the semantic meaning of this patch:
| |
| getOldId | back to summary |
|---|---|
| public AbbreviatedObjectId getOldId() Get the old object id from the
| |
| getOldMode | back to summary |
|---|---|
| public FileMode getOldMode() Get the old file mode
| |
| getOldPath | back to summary |
|---|---|
| public String getOldPath() Get the old name associated with this file. The meaning of the old name can differ depending on the semantic meaning of this patch:
| |
| getPath | back to summary |
|---|---|
| public String getPath(DiffEntry. Get the path associated with this file. | |
| getScore | back to summary |
|---|---|
| public int getScore() Get similarity score
| |
| getTreeFilterMarks | back to summary |
|---|---|
| public int getTreeFilterMarks() Get the raw tree filter marks, as set during
| |
| isMarked | back to summary |
|---|---|
| public boolean isMarked(int index) Whether the mark tree filter with the specified index matched during scan
or not, see TreeFilter filterA = ...; TreeFilter filterB = ...; List<DiffEntry> entries = DiffEntry.scan(walk, false, filterA, filterB); DiffEntry entry = entries.get(0); boolean filterAMatched = entry.isMarked(0); boolean filterBMatched = entry.isMarked(1); Note that 0 corresponds to filterA because it was the first filter that was passed to scan.
To query more than one flag at once, see
| |
| modify | back to summary |
|---|---|
| pack-priv static DiffEntry modify(String path) | |
| pair | back to summary |
|---|---|
| pack-priv static DiffEntry pair(DiffEntry. | |
| scan | back to summary |
|---|---|
| public static List Convert the TreeWalk into DiffEntry headers.
| |
| scan | back to summary |
|---|---|
| public static List Convert the TreeWalk into DiffEntry headers, depending on
| |
| scan | back to summary |
|---|---|
| public static List Convert the TreeWalk into DiffEntry headers, depending on
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final DiffEntry. | ADD
Add a new file to the project |
| public static final DiffEntry. | COPY
Copy an existing file to a new location, keeping the original |
| public static final DiffEntry. | DELETE
Delete an existing file from the project |
| public static final DiffEntry. | MODIFY
Modify an existing file in the project (content and/or mode) |
| public static final DiffEntry. | RENAME
Rename an existing file to a new location |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static DiffEntry. | |
| public static DiffEntry. |
| ADD | back to summary |
|---|---|
| public static final DiffEntry. Add a new file to the project | |
| COPY | back to summary |
|---|---|
| public static final DiffEntry. Copy an existing file to a new location, keeping the original | |
| DELETE | back to summary |
|---|---|
| public static final DiffEntry. Delete an existing file from the project | |
| MODIFY | back to summary |
|---|---|
| public static final DiffEntry. Modify an existing file in the project (content and/or mode) | |
| RENAME | back to summary |
|---|---|
| public static final DiffEntry. Rename an existing file to a new location | |
| ChangeType | back to summary |
|---|---|
| private ChangeType() | |
| valueOf | back to summary |
|---|---|
| public static DiffEntry. | |
| values | back to summary |
|---|---|
| public static DiffEntry. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final DiffEntry. | NEW
The new side of a DiffEntry. |
| public static final DiffEntry. | OLD
The old side of a DiffEntry. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static DiffEntry. | |
| public static DiffEntry. |
| NEW | back to summary |
|---|---|
| public static final DiffEntry. The new side of a DiffEntry. | |
| OLD | back to summary |
|---|---|
| public static final DiffEntry. The old side of a DiffEntry. | |
| Side | back to summary |
|---|---|
| private Side() | |
| valueOf | back to summary |
|---|---|
| public static DiffEntry. | |
| values | back to summary |
|---|---|
| public static DiffEntry. | |