Candidates are kept in a queue by BlameGenerator, allowing the generator to
perform a parallel search down the parents of any merges that are discovered
during the history traversal. Each candidate retains a regionList
describing sections of the result file the candidate has taken responsibility
for either directly or indirectly through its history. Actual blame from this
region list will be assigned to the candidate when its ancestor commit(s) are
themselves converted into Candidate objects and the ancestor's candidate uses
takeBlame(EditList, Candidate) to accept responsibility for sections
of the result.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | Candidate.
Candidate loaded from a file source, and not a commit. |
| pack-priv static class | Candidate.
A |
| pack-priv static class | Candidate.
Special candidate type used for reverse blame. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Candidate | queueNext
Next candidate in the candidate queue. |
| pack-priv Region | regionList
Chain of regions this candidate may be blamed for. |
| pack-priv int | renameScore
Score assigned to the rename to this candidate. |
| pack-priv ObjectId | sourceBlob
Unique name of the candidate blob in |
| pack-priv RevCommit | sourceCommit
Commit being considered (or blamed, depending on state). |
| pack-priv PathFilter | sourcePath
Path of the candidate file in |
| private Repository | sourceRepository
repository used for LFS blob handling |
| pack-priv RawText | sourceText
Complete contents of the file in |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| private static Region | |
| pack-priv void | |
| private static void | |
| pack-priv boolean | |
| private Region | |
| pack-priv Candidate | |
| pack-priv Candidate | |
| pack-priv PersonIdent | |
| pack-priv Candidate | |
| pack-priv RevCommit | |
| pack-priv int | |
| pack-priv int | |
| pack-priv boolean | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public String |
| queueNext | back to summary |
|---|---|
| pack-priv Candidate queueNext Next candidate in the candidate queue. | |
| regionList | back to summary |
|---|---|
| pack-priv Region regionList Chain of regions this candidate may be blamed for. This list is always kept sorted by resultStart order, making it simple to merge-join with the sorted EditList during blame assignment. | |
| renameScore | back to summary |
|---|---|
| pack-priv int renameScore Score assigned to the rename to this candidate. Consider the history "A<-B<-C". If the result file S in C was renamed to R in B, the rename score for this rename will be held in this field by the candidate object for B. By storing the score with B, the application can see what the rename score was as it makes the transition from C/S to B/R. This may seem backwards since it was C that performed the rename, but the application doesn't learn about path R until B. | |
| sourceBlob | back to summary |
|---|---|
| pack-priv ObjectId sourceBlob Unique name of the candidate blob in | |
| sourceCommit | back to summary |
|---|---|
| pack-priv RevCommit sourceCommit Commit being considered (or blamed, depending on state). | |
| sourcePath | back to summary |
|---|---|
| pack-priv PathFilter sourcePath Path of the candidate file in | |
| sourceRepository | back to summary |
|---|---|
| private Repository sourceRepository repository used for LFS blob handling | |
| sourceText | back to summary |
|---|---|
| pack-priv RawText sourceText Complete contents of the file in | |
| Candidate | back to summary |
|---|---|
| pack-priv Candidate(Repository repo, RevCommit commit, PathFilter path) | |
| add | back to summary |
|---|---|
| pack-priv void add(RevFlag flag) | |
| add | back to summary |
|---|---|
| private static Region add(Region aTail, Candidate a, Region n) | |
| beginResult | back to summary |
|---|---|
| pack-priv void beginResult(RevWalk rw) throws MissingObjectException, IOException | |
| blame | back to summary |
|---|---|
| private static void blame(EditList editList, Candidate a, Candidate b) | |
| canMergeRegions | back to summary |
|---|---|
| pack-priv boolean canMergeRegions(Candidate other) | |
| clearRegionList | back to summary |
|---|---|
| private Region clearRegionList() | |
| copy | back to summary |
|---|---|
| pack-priv Candidate copy(RevCommit commit) | |
| create | back to summary |
|---|---|
| pack-priv Candidate create(Repository repo, RevCommit commit, PathFilter path) | |
| getAuthor | back to summary |
|---|---|
| pack-priv PersonIdent getAuthor() | |
| getNextCandidate | back to summary |
|---|---|
| pack-priv Candidate getNextCandidate(int idx) | |
| getParent | back to summary |
|---|---|
| pack-priv RevCommit getParent(int idx) | |
| getParentCount | back to summary |
|---|---|
| pack-priv int getParentCount() | |
| getTime | back to summary |
|---|---|
| pack-priv int getTime() | |
| has | back to summary |
|---|---|
| pack-priv boolean has(RevFlag flag) | |
| loadText | back to summary |
|---|---|
| pack-priv void loadText(ObjectReader reader) throws IOException | |
| mergeRegions | back to summary |
|---|---|
| pack-priv void mergeRegions(Candidate other) | |
| remove | back to summary |
|---|---|
| pack-priv void remove(RevFlag flag) | |
| takeBlame | back to summary |
|---|---|
| pack-priv void takeBlame(EditList editList, Candidate child) | |
| 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-
| |
The Candidate#sourceCommit field is always null on this type of
candidate. Instead history traversal follows the single parent
field to discover the next Candidate. Often this is a normal Candidate
type that has a valid sourceCommit.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv String | description
Author name to refer to this blob with. |
| pack-priv Candidate | parent
Next candidate to pass blame onto. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv void | |
| pack-priv PersonIdent | |
| pack-priv Candidate | |
| pack-priv RevCommit | |
| pack-priv int | |
| pack-priv int | |
| pack-priv boolean | |
| pack-priv void |
| description | back to summary |
|---|---|
| pack-priv String description Author name to refer to this blob with. | |
| parent | back to summary |
|---|---|
| pack-priv Candidate parent Next candidate to pass blame onto. When computing the differences that this candidate introduced to the file content, the parent's sourceText is used as the base. | |
| BlobCandidate | back to summary |
|---|---|
| pack-priv BlobCandidate(Repository repo, String name, PathFilter path) | |
| add | back to summary |
|---|---|
| pack-priv void add(RevFlag flag) Overrides org.
| |
| beginResult | back to summary |
|---|---|
| pack-priv void beginResult(RevWalk rw) Overrides org.
| |
| getAuthor | back to summary |
|---|---|
| pack-priv PersonIdent getAuthor() Overrides org.
| |
| getNextCandidate | back to summary |
|---|---|
| pack-priv Candidate getNextCandidate(int idx) Overrides org.
| |
| getParent | back to summary |
|---|---|
| pack-priv RevCommit getParent(int idx) Overrides org.
| |
| getParentCount | back to summary |
|---|---|
| pack-priv int getParentCount() Overrides org.
| |
| getTime | back to summary |
|---|---|
| pack-priv int getTime() Overrides org.
| |
| has | back to summary |
|---|---|
| pack-priv boolean has(RevFlag flag) Overrides org.
| |
| remove | back to summary |
|---|---|
| pack-priv void remove(RevFlag flag) Overrides org.
| |
Candidate to blame a working tree file in conflict state.
Contrary to BlobCandidate, it expects to be given the parent
commits (typically HEAD and the MERGE_HEADs) and behaves like a merge
commit during blame. It does not consider a previously pushed
Candidate as its parent.
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv void | |
| pack-priv PersonIdent | |
| pack-priv RevCommit | |
| pack-priv int | |
| pack-priv int | |
| pack-priv boolean | |
| pack-priv void |
| parents | back to summary |
|---|---|
| private List<RevCommit> parents | |
| HeadCandidate | back to summary |
|---|---|
| pack-priv HeadCandidate(Repository repo, PathFilter path, List<RevCommit> parents) | |
| add | back to summary |
|---|---|
| pack-priv void add(RevFlag flag) Overrides org.
| |
| beginResult | back to summary |
|---|---|
| pack-priv void beginResult(RevWalk rw) Overrides org.
| |
| getAuthor | back to summary |
|---|---|
| pack-priv PersonIdent getAuthor() Overrides org.
| |
| getParent | back to summary |
|---|---|
| pack-priv RevCommit getParent(int idx) Overrides org.
| |
| getParentCount | back to summary |
|---|---|
| pack-priv int getParentCount() Overrides org.
| |
| getTime | back to summary |
|---|---|
| pack-priv int getTime() Overrides org.
| |
| has | back to summary |
|---|---|
| pack-priv boolean has(RevFlag flag) Overrides org.
| |
| remove | back to summary |
|---|---|
| pack-priv void remove(RevFlag flag) Overrides org.
| |
Reverse blame inverts the commit history graph to follow from a commit to
its descendant children, rather than the normal history direction of
child to parent. These types require a ReverseCommit which keeps
children pointers, allowing reverse navigation of history.
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Candidate | create(Repository repo, RevCommit commit, PathFilter path)
Overrides org.
|
| pack-priv RevCommit | |
| pack-priv int | |
| pack-priv int | |
| public String | toString()
Overrides org. Returns a string representation of the object. |
| ReverseCandidate | back to summary |
|---|---|
| pack-priv ReverseCandidate(Repository repo, ReverseWalk. | |
| create | back to summary |
|---|---|
| pack-priv Candidate create(Repository repo, RevCommit commit, PathFilter path) Overrides org.
| |
| getParent | back to summary |
|---|---|
| pack-priv RevCommit getParent(int idx) Overrides org.
| |
| getParentCount | back to summary |
|---|---|
| pack-priv int getParentCount() Overrides org.
| |
| getTime | back to summary |
|---|---|
| pack-priv int getTime() Overrides org.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |