private void advertiseAnyOnce(RevObject obj, string refName) { if (!obj.has(ADVERTISED)) { advertiseAny(obj, refName); } }
private void AddCommonBase(RevObject o) { if (o.has(COMMON)) return; o.add(COMMON); _commonBase.Add(o); okToGiveUp = null; }
private void Want(RevObject o) { if (o.has(WANT)) return; o.add(WANT); _wantAll.Add(o); if (o is RevCommit) _wantCommits.Add((RevCommit)o); else if (o is RevTag) { do { o = ((RevTag)o).getObject(); } while (o is RevTag); if (o is RevCommit) Want(o); } }
private void Needs(RevObject obj) { if (obj.has(COMPLETE)) return; if (!obj.has(IN_WORK_QUEUE)) { obj.add(IN_WORK_QUEUE); _workQueue.AddLast(obj); } }
private void MarkTreeComplete(RevObject tree) { if (tree.has(COMPLETE)) return; tree.add(COMPLETE); _treeWalk.reset(tree); while (_treeWalk.next()) { FileMode mode = _treeWalk.getFileMode(0); int sType = mode.Bits; switch (sType) { case Constants.OBJ_BLOB: _treeWalk.getObjectId(_idBuffer, 0); _revWalk.lookupAny(_idBuffer, sType).add(COMPLETE); continue; case Constants.OBJ_TREE: { _treeWalk.getObjectId(_idBuffer, 0); RevObject o = _revWalk.lookupAny(_idBuffer, sType); if (!o.has(COMPLETE)) { o.add(COMPLETE); _treeWalk.enterSubtree(); } continue; } default: if (FileMode.GitLink.Equals(sType)) continue; _treeWalk.getObjectId(_idBuffer, 0); throw new CorruptObjectException("Invalid mode " + mode + " for " + _idBuffer.Name + " " + _treeWalk.getPathString() + " in " + tree.Name); } } }
private void Want(RevObject o) { if (o.has(WANT)) return; o.add(WANT); _wantAll.Add(o); RevTag oTag = (o as RevTag); while (oTag != null) { o = oTag.getObject(); oTag = (o as RevTag); } RevCommit oComm = (o as RevCommit); if (oComm != null) { _wantCommits.Add(oComm); } }