Record Class BlameOptions

java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.git.api.BlameOptions
Record Components:
ignoreWhitespace - changes of white space only are not changes of a line (like git blame -w)
ignoreRevisions - commits (full or abbreviated ids; the ones this repository does not have are skipped) whose changes are not to be blamed: the lines they changed go to the commit before (like git blame --ignore-rev, for example the ids in the file .git-blame-ignore-revs)

public record BlameOptions(boolean ignoreWhitespace, List<String> ignoreRevisions) extends Record
What a blame is to ignore (feature 47).
  • Field Details

    • DEFAULT

      public static final BlameOptions DEFAULT
      Everything counts.
  • Constructor Details

    • BlameOptions

      public BlameOptions(boolean ignoreWhitespace, List<String> ignoreRevisions)
      Creates an instance of a BlameOptions record class.
      Parameters:
      ignoreWhitespace - the value for the ignoreWhitespace record component
      ignoreRevisions - the value for the ignoreRevisions record component
  • Method Details

    • parseIgnoreRevs

      public static List<String> parseIgnoreRevs(String fileText)
      The ids in the text of a .git-blame-ignore-revs file: one per line, # starts a comment, blank lines are skipped.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • ignoreWhitespace

      public boolean ignoreWhitespace()
      Returns the value of the ignoreWhitespace record component.
      Returns:
      the value of the ignoreWhitespace record component
    • ignoreRevisions

      public List<String> ignoreRevisions()
      Returns the value of the ignoreRevisions record component.
      Returns:
      the value of the ignoreRevisions record component