Specialized subclass of RevWalk to include trees, blobs and tags. Unlike RevWalk this subclass is able to remember starting roots that include annotated tags, or arbitrary trees or blobs. Once commit generation is complete and all commits have been popped by the application, individual annotated tag, tree and blob objects can be popped through the additional method nextObject. Tree and blob objects reachable from interesting commits are automatically scheduled for inclusion in the results of nextObject, returning each object exactly once. Objects are sorted and returned according to the the commits that reference them and the order they appear within a tree. Ordering can be affected by changing the RevSort used to order the commits that are returned first.
Inheritance: RevWalk
Ejemplo n.º 1
0
 private bool askForIsComplete()
 {
     try
     {
         using(ObjectWalk ow = new ObjectWalk(_transport.Local))
         {
             foreach (ObjectId want in _askFor.Keys)
             {
                 ow.markStart(ow.parseAny(want));
             }
             foreach (Ref @ref in _transport.Local.getAllRefs().Values)
             {
                 ow.markUninteresting(ow.parseAny(@ref.ObjectId));
             }
             ow.checkConnectivity();
             return true;
         }
     }
     catch (MissingObjectException)
     {
         return false;
     }
     catch (IOException e)
     {
         throw new TransportException("Unable to check connectivity.", e);
     }
 }
Ejemplo n.º 2
0
 protected override global::GitSharp.Core.RevWalk.RevWalk createRevWalk()
 {
     return objw = new ObjectWalk(db);
 }
Ejemplo n.º 3
0
 private void CheckConnectivity()
 {
     using(var ow = new ObjectWalk(db))
     {
         foreach (ReceiveCommand cmd in commands)
         {
             if (cmd.getResult() != ReceiveCommand.Result.NOT_ATTEMPTED) continue;
             if (cmd.getType() == ReceiveCommand.Type.DELETE) continue;
             ow.markStart(ow.parseAny(cmd.getNewId()));
         }
         foreach (Ref @ref in refs.Values)
         {
             ow.markUninteresting(ow.parseAny(@ref.ObjectId));
         }
         ow.checkConnectivity();
     }
 }