Class FileHistoryGraph

java.lang.Object
io.github.jbastgen.stemma.app.graph.FileHistoryGraph

public final class FileHistoryGraph extends Object
The parents of the commits in the history of one file (feature 46): the graph of a list that has only some of the commits would have lines that run to commits that are not there. Here every commit points to the nearest commits of the list above it (its ancestors that are in the list), as git log --parents -- file rewrites them, so the lanes of the graph make sense.
  • Method Details

    • parents

      public static Map<String,List<String>> parents(List<Commit> all, Set<String> keep)
      Parameters:
      all - the commits of the repository, newest first
      keep - the ids of the commits that are in the history of the file
      Returns:
      for each commit of keep (in the order of all) its parents among keep