Class MergeBaseGenerator

java.lang.Object
org.eclipse.jgit.revwalk.Generator
org.eclipse.jgit.revwalk.MergeBaseGenerator

class MergeBaseGenerator extends Generator
Computes the merge base(s) of the starting commits.

This generator is selected if the RevFilter is only RevFilter.MERGE_BASE.

To compute the merge base we assign a temporary flag to each of the starting commits. The maximum number of starting commits is bounded by the number of free flags available in the RevWalk when the generator is initialized. These flags will be automatically released on the next reset of the RevWalk, but not until then, as they are assigned to commits throughout the history.

Several internal flags are reused here for a different purpose, but this should not have any impact as this generator should be run alone, and without any other generators wrapped around it.