Class Candidate

  • Direct Known Subclasses:
    Candidate.BlobCandidate, Candidate.HeadCandidate, Candidate.ReverseCandidate

    class Candidate
    extends java.lang.Object
    A source that may have supplied some (or all) of the result file.

    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.

    • Field Detail

      • queueNext

        Candidate queueNext
        Next candidate in the candidate queue.
      • sourceCommit

        RevCommit sourceCommit
        Commit being considered (or blamed, depending on state).
      • regionList

        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

        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.

      • sourceRepository

        private Repository sourceRepository
        repository used for LFS blob handling