Class RevWalkTextBuiltin

java.lang.Object
org.eclipse.jgit.pgm.TextBuiltin
org.eclipse.jgit.pgm.RevWalkTextBuiltin
Direct Known Subclasses:
Glog, Log, RevList

abstract class RevWalkTextBuiltin extends TextBuiltin
  • Field Details

    • walk

      RevWalk walk
    • objects

      boolean objects
    • parents

      boolean parents
    • count

      boolean count
    • all

      boolean all
    • outbuffer

      char[] outbuffer
    • sorting

      private final EnumSet<RevSort> sorting
    • followPath

      private String followPath
    • commits

      private List<RevCommit> commits
    • pathFilter

      protected TreeFilter pathFilter
    • revLimiter

      private final List<RevFilter> revLimiter
    • maxCount

      private int maxCount
  • Constructor Details

    • RevWalkTextBuiltin

      RevWalkTextBuiltin()
  • Method Details

    • enableRevSort

      private void enableRevSort(RevSort type, boolean on)
    • enableDateOrder

      void enableDateOrder(boolean on)
    • enableTopoOrder

      void enableTopoOrder(boolean on)
    • enableReverse

      void enableReverse(boolean on)
    • enableBoundary

      void enableBoundary(boolean on)
    • addAuthorRevFilter

      void addAuthorRevFilter(String who)
    • addCommitterRevFilter

      void addCommitterRevFilter(String who)
    • addCMessageRevFilter

      void addCMessageRevFilter(String msg)
    • run

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

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

      Specified by:
      run in class TextBuiltin
      Throws:
      Exception - an error occurred while processing the command. The main framework will catch the exception and print a message on standard error.
    • createWalk

      protected RevWalk createWalk()
      Create RevWalk
      Returns:
      a RevWalk object.
    • walkLoop

      protected int walkLoop() throws Exception
      Loop the walk
      Returns:
      number of RevCommits walked
      Throws:
      Exception - if any.
    • show

      protected abstract void show(RevCommit c) throws Exception
      "Show" the current RevCommit when called from the main processing loop.

      Implement this methods to define the behavior for subclasses of RevWalkTextBuiltin.

      Parameters:
      c - The current RevCommit
      Throws:
      Exception
    • show

      protected void show(ObjectWalk objectWalk, RevObject currentObject) throws Exception
      "Show" the current RevCommit when called from the main processing loop.

      The default implementation does nothing because most subclasses only process RevCommits.

      Parameters:
      objectWalk - the ObjectWalk used by walkLoop()
      currentObject - The current RevObject
      Throws:
      Exception