Class AbstractDiffCommandParameters

Direct Known Subclasses:
CompareDiffCommandParameters, DiffCommandParameters, PullRequestDiffCommandParameters

public class AbstractDiffCommandParameters extends AbstractCommandParameters
  • Field Details

  • Constructor Details

  • Method Details

    • getContextLines

      public int getContextLines()
    • getMaxLineLength

      public int getMaxLineLength()
    • getMaxLines

      public int getMaxLines()
    • getPaths

      @Nonnull public Set<String> getPaths()
    • getSecondaryRepository

      @Nullable public Repository getSecondaryRepository()
      Retrieves the secondary repository from which to generate the diff. Commits in this repository may only be identified by hash. Any branch or tag names used will always be resolved using the primary repository.
      Returns:
      a secondary repository from which to generate the diff
      Since:
      6.7
    • hasContextLines

      public boolean hasContextLines()
    • hasPaths

      public boolean hasPaths()
    • getWhitespace

      @Nonnull public DiffWhitespace getWhitespace()
      Returns:
      optional flag to potentially ignore whitespace
    • toContext

      @Nonnull protected DiffContext toContext(@Nonnull DiffContext.Builder builder)
      Appends common attributes to the provided DiffContext.Builder before building it and returning the final DiffContext.
      Parameters:
      builder - the starting builder to apply common attributes to before building
      Returns:
      the DiffContext from the provided builder