Class CombinedChanges

java.lang.Object
io.github.jbastgen.stemma.app.model.CombinedChanges

public final class CombinedChanges extends Object
What several selected commits changed, put together. Works for any selection, also for commits that do not follow each other, so it combines the changes instead of computing a net difference (which only exists for an unbroken chain of commits):
  • the file list is the union of the files the commits touched, with the status folded in chronological order and the line counts added up;
  • the diff of a file is the diffs of the commits that touched it, one after the other, each under a heading that names the commit.
  • Method Details

    • combineFiles

      public static List<FileChange> combineFiles(List<List<FileChange>> perCommitOldestFirst)
      Parameters:
      perCommitOldestFirst - the changed files of each selected commit, the oldest commit first
      Returns:
      one entry per path, sorted by path
    • combineDiffs

      public static List<DiffLine> combineDiffs(List<CombinedChanges.Segment> segments)
      The segments one after the other, each introduced by its heading; one explanatory line if there is nothing.
    • totals

      public static int[] totals(List<FileChange> files)
      Totals over a file list; unknown counts (-1) count as 0.