Enum RevSort

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<RevSort>

    public enum RevSort
    extends java.lang.Enum<RevSort>
    Sorting strategies supported by RevWalk and ObjectWalk.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BOUNDARY
      Include RevFlag.UNINTERESTING boundary commits after all others.
      COMMIT_TIME_DESC
      Sort by commit time, descending (newest first, oldest last).
      NONE
      No specific sorting is requested.
      REVERSE
      Flip the output into the reverse ordering.
      TOPO
      Topological sorting (all children before parents).
      TOPO_KEEP_BRANCH_TOGETHER
      Topological sorting (all children before parents) without intermixing lines of history.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private RevSort()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static RevSort valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static RevSort[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • NONE

        public static final RevSort NONE
        No specific sorting is requested.

        Applications should not rely upon the ordering produced by this strategy. Any ordering in the output is caused by low level implementation details and may change without notice.

      • COMMIT_TIME_DESC

        public static final RevSort COMMIT_TIME_DESC
        Sort by commit time, descending (newest first, oldest last).

        This strategy can be combined with TOPO.

      • TOPO

        public static final RevSort TOPO
        Topological sorting (all children before parents).

        This strategy can be combined with COMMIT_TIME_DESC.

      • TOPO_KEEP_BRANCH_TOGETHER

        public static final RevSort TOPO_KEEP_BRANCH_TOGETHER
        Topological sorting (all children before parents) without intermixing lines of history.

        This behavior more closely resembles C Git's git-log --topo-order than TOPO. See C Git's topo-order description.

        Since:
        5.8
      • REVERSE

        public static final RevSort REVERSE
        Flip the output into the reverse ordering.

        This strategy can be combined with the others described by this type as it is usually performed at the very end.

      • BOUNDARY

        public static final RevSort BOUNDARY
        Include RevFlag.UNINTERESTING boundary commits after all others. In ObjectWalk, objects associated with such commits (trees, blobs), and all other objects marked explicitly as UNINTERESTING are also included.

        A boundary commit is a UNINTERESTING parent of an interesting commit that was previously output.

    • Constructor Detail

      • RevSort

        private RevSort()
    • Method Detail

      • values

        public static RevSort[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (RevSort c : RevSort.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RevSort valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null