Class Diff


class Diff extends TextBuiltin
  • Field Details

    • diffFmt

      private DiffFormatter diffFmt
    • oldTree

      private AbstractTreeIterator oldTree
    • newTree

      private AbstractTreeIterator newTree
    • cached

      private boolean cached
    • pathFilter

      private TreeFilter pathFilter
    • showPatch

      boolean showPatch
    • detectRenames

      private Boolean detectRenames
    • renameLimit

      private Integer renameLimit
    • showNameAndStatusOnly

      private boolean showNameAndStatusOnly
  • Constructor Details

    • Diff

      Diff()
  • Method Details

    • noRenames

      void noRenames(boolean on)
    • setAlgorithm

      void setAlgorithm(DiffAlgorithm.SupportedAlgorithm s)
    • ignoreSpaceAtEol

      void ignoreSpaceAtEol(boolean on)
    • ignoreLeadingSpace

      void ignoreLeadingSpace(boolean on)
    • ignoreSpaceChange

      void ignoreSpaceChange(boolean on)
    • ignoreAllSpace

      void ignoreAllSpace(boolean on)
    • unified

      void unified(int lines)
    • abbrev

      void abbrev(int lines)
    • abbrev

      void abbrev(boolean on)
    • sourcePrefix

      void sourcePrefix(String path)
    • dstPrefix

      void dstPrefix(String path)
    • noPrefix

      void noPrefix(boolean on)
    • init

      protected void init(Repository repository, String gitDir)
      Initialize the command to work with a repository.
      Overrides:
      init in class TextBuiltin
      Parameters:
      repository - the opened repository that the command should work on.
      gitDir - value of the --git-dir command line option, if repository is null.
    • run

      protected void run()
      Perform the actions of this command.

      This method should only be invoked by TextBuiltin.execute(String[]).

      Specified by:
      run in class TextBuiltin
    • nameStatus

      static void nameStatus(ThrowingPrintWriter out, List<DiffEntry> files) throws IOException
      Throws:
      IOException