Class GitModifiedFilesLoader

java.lang.Object
com.google.gerrit.server.patch.gitdiff.GitModifiedFilesLoader

public class GitModifiedFilesLoader extends Object
/** Class to load the files that have been modified between two Git trees.

Rename detection is off unless withRenameDetection(int) is called.

The commits and the commit trees are looked up via the RevWalk instance that is provided to the load(Config, ObjectReader, ObjectId, ObjectId) method.

  • Constructor Details

    • GitModifiedFilesLoader

      public GitModifiedFilesLoader()
  • Method Details

    • withRenameDetection

      @CanIgnoreReturnValue public GitModifiedFilesLoader withRenameDetection(int renameScore)
      Enables rename detection
      Parameters:
      renameScore - the score that should be used for the rename detection.
    • load

      public com.google.common.collect.ImmutableList<ModifiedFile> load(org.eclipse.jgit.lib.Config repoConfig, org.eclipse.jgit.lib.ObjectReader reader, org.eclipse.jgit.lib.ObjectId aTree, org.eclipse.jgit.lib.ObjectId bTree) throws IOException
      Loads the files that have been modified between aTree and bTree.

      The trees are looked up via the given revWalk instance,

      Throws:
      IOException