Class HistoryOrder
java.lang.Object
io.github.jbastgen.stemma.git.api.HistoryOrder
Brings a history that is ordered by commit time into an order in which no parent comes before one of its
children. That is what the commit graph needs. Ordering by time alone is much cheaper than asking git for a
topological order, which has to read the whole history, but a computer with a wrong clock can produce a commit
that is older than its parent; this repairs exactly those cases and leaves everything else where it is.
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<CommitInfo> parentsAfterChildren(List<CommitInfo> commits) Returnscommitsunchanged if every commit comes before its parents (the usual case); otherwise a copy in which that holds, with commits as close to their old places as possible.
-
Method Details
-
parentsAfterChildren
Returnscommitsunchanged if every commit comes before its parents (the usual case); otherwise a copy in which that holds, with commits as close to their old places as possible. Parents that are not in the list are ignored.
-