Class DepthWalk.ObjectWalk

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.lang.Iterable<RevCommit>, DepthWalk
    Enclosing interface:
    DepthWalk

    public static class DepthWalk.ObjectWalk
    extends ObjectWalk
    implements DepthWalk
    Subclass of ObjectWalk that performs depth filtering.
    • Field Detail

      • depth

        private final int depth
      • deepenSince

        private int deepenSince
      • deepenNots

        private java.util.List<ObjectId> deepenNots
      • UNSHALLOW

        private final RevFlag UNSHALLOW
      • REINTERESTING

        private final RevFlag REINTERESTING
      • DEEPEN_NOT

        private final RevFlag DEEPEN_NOT
    • Constructor Detail

      • ObjectWalk

        public ObjectWalk​(Repository repo,
                          int depth)
        Parameters:
        repo - Repository to walk
        depth - Maximum depth to return
      • ObjectWalk

        public ObjectWalk​(ObjectReader or,
                          int depth)
        Parameters:
        or - Object Reader
        depth - Maximum depth to return
    • Method Detail

      • createCommit

        protected RevCommit createCommit​(AnyObjectId id)
        Description copied from class: RevWalk
        Construct a new unparsed commit for the given object.
        Overrides:
        createCommit in class RevWalk
        Parameters:
        id - the object this walker requires a commit reference for.
        Returns:
        a new unparsed reference for the object.
      • getDepth

        public int getDepth()
        Description copied from interface: DepthWalk
        Get depth to filter to.
        Specified by:
        getDepth in interface DepthWalk
        Returns:
        Depth to filter to.
      • getDeepenSince

        public int getDeepenSince()
        Specified by:
        getDeepenSince in interface DepthWalk
        Returns:
        the deepen-since value; if not 0, this walk only returns commits whose commit time is at or after this limit
      • getDeepenNots

        public java.util.List<ObjectId> getDeepenNots()
        Specified by:
        getDeepenNots in interface DepthWalk
        Returns:
        the objects specified by the client using --shallow-exclude
      • getUnshallowFlag

        public RevFlag getUnshallowFlag()
        Description copied from interface: DepthWalk
        Get flag marking commits that should become unshallow.
        Specified by:
        getUnshallowFlag in interface DepthWalk
        Returns:
        flag marking commits that should become unshallow.
      • getReinterestingFlag

        public RevFlag getReinterestingFlag()
        Description copied from interface: DepthWalk
        Get flag marking commits that are interesting again.
        Specified by:
        getReinterestingFlag in interface DepthWalk
        Returns:
        flag marking commits that are interesting again.
      • getDeepenNotFlag

        public RevFlag getDeepenNotFlag()
        Specified by:
        getDeepenNotFlag in interface DepthWalk
        Returns:
        flag marking commits that are to be excluded because of --shallow-exclude