void init(AbstractRevQueue p) throws IOException { try { for (;;) { final RevCommit c = p.next(); if (c == null) break; add(c); } // Setup the condition used by carryOntoOne to detect a late // merge base and produce it on the next round. // recarryTest = branchMask | POPPED; recarryMask = branchMask | POPPED | MERGE_BASE; mergeBaseAncestor = walker.allocFlag(); for (;;) { RevCommit c = _next(); if (c == null) { break; } ret.add(c); } } finally { // Always free the flags immediately. This ensures the flags // will be available for reuse when the walk resets. // walker.freeFlag(branchMask | mergeBaseAncestor); } }
private void carryOntoHistoryInnerLoop(RevCommit c, int carry) { for (;;) { RevCommit[] parents = c.parents; if (parents == null || parents.length == 0) { break; } int e = parents.length - 1; for (int i = 0; i < e; i++) { RevCommit p = parents[i]; if (carryOntoOne(p, carry) == CONTINUE) { // Walking p will be required, buffer p on stack. stack = new CarryStack(stack, p, carry); } // For other results from carryOntoOne: // HAVE_ALL: p has all bits, do nothing to skip that path. // CONTINUE_ON_STACK: callee pushed StackElement for p. } c = parents[e]; if (carryOntoOne(c, carry) != CONTINUE) { break; } } }
private void carryOntoHistory(RevCommit c, int carry) { stack = null; for (;;) { carryOntoHistoryInnerLoop(c, carry); if (stack == null) { break; } c = stack.c; carry = stack.carry; stack = stack.prev; } }
JGitText.get().cannotCombineTreeFilterWithRevFilter, tf, rf)); final MergeBaseGenerator mbg = new MergeBaseGenerator(w); walker.pending = mbg; walker.queue = AbstractRevQueue.EMPTY_QUEUE; mbg.init(q); return mbg.next();
private void carryOntoHistory(RevCommit c, final int carry) { for (;;) { final RevCommit[] pList = c.parents; if (pList == null) return; final int n = pList.length; if (n == 0) return; for (int i = 1; i < n; i++) { final RevCommit p = pList[i]; if (!carryOntoOne(p, carry)) carryOntoHistory(p, carry); } c = pList[0]; if (carryOntoOne(c, carry)) break; } }
void init(final AbstractRevQueue p) { try { for (;;) { final RevCommit c = p.next(); if (c == null) break; add(c); } } finally { // Always free the flags immediately. This ensures the flags // will be available for reuse when the walk resets. // walker.freeFlag(branchMask); // Setup the condition used by carryOntoOne to detect a late // merge base and produce it on the next round. // recarryTest = branchMask | POPPED; recarryMask = branchMask | POPPED | MERGE_BASE; } }
JGitText.get().cannotCombineTreeFilterWithRevFilter, tf, rf)); final MergeBaseGenerator mbg = new MergeBaseGenerator(w); walker.pending = mbg; walker.queue = AbstractRevQueue.EMPTY_QUEUE; mbg.init(q); return mbg.next();
private boolean carryOntoOne(final RevCommit p, final int carry) { final boolean haveAll = (p.flags & carry) == carry; p.flags |= carry; if ((p.flags & recarryMask) == recarryTest) { // We were popped without being a merge base, but we just got // voted to be one. Inject ourselves back at the front of the // pending queue and tell all of our ancestors they are within // the merge base now. // p.flags &= ~POPPED; pending.add(p); carryOntoHistory(p, branchMask | MERGE_BASE); return true; } // If we already had all carried flags, our parents do too. // Return true to stop the caller from running down this leg // of the revision graph any further. // return haveAll; } }
JGitText.get().cannotCombineTreeFilterWithRevFilter, tf, rf)); final MergeBaseGenerator mbg = new MergeBaseGenerator(w); walker.pending = mbg; walker.queue = AbstractRevQueue.EMPTY_QUEUE; mbg.init(q); return mbg.next();
void init(AbstractRevQueue p) throws IOException { try { for (;;) { final RevCommit c = p.next(); if (c == null) break; add(c); } // Setup the condition used by carryOntoOne to detect a late // merge base and produce it on the next round. // recarryTest = branchMask | POPPED; recarryMask = branchMask | POPPED | MERGE_BASE; mergeBaseAncestor = walker.allocFlag(); for (;;) { RevCommit c = _next(); if (c == null) { break; } ret.add(c); } } finally { // Always free the flags immediately. This ensures the flags // will be available for reuse when the walk resets. // walker.freeFlag(branchMask | mergeBaseAncestor); } }
carryOntoHistory(c, carry);
private void carryOntoHistoryInnerLoop(RevCommit c, int carry) { for (;;) { RevCommit[] parents = c.parents; if (parents == null || parents.length == 0) { break; } int e = parents.length - 1; for (int i = 0; i < e; i++) { RevCommit p = parents[i]; if (carryOntoOne(p, carry) == CONTINUE) { // Walking p will be required, buffer p on stack. stack = new CarryStack(stack, p, carry); } // For other results from carryOntoOne: // HAVE_ALL: p has all bits, do nothing to skip that path. // CONTINUE_ON_STACK: callee pushed StackElement for p. } c = parents[e]; if (carryOntoOne(c, carry) != CONTINUE) { break; } } }
private void carryOntoHistory(RevCommit c, int carry) { stack = null; for (;;) { carryOntoHistoryInnerLoop(c, carry); if (stack == null) { break; } c = stack.c; carry = stack.carry; stack = stack.prev; } }
JGitText.get().cannotCombineTreeFilterWithRevFilter, tf, rf)); final MergeBaseGenerator mbg = new MergeBaseGenerator(w); walker.pending = mbg; walker.queue = AbstractRevQueue.EMPTY_QUEUE; mbg.init(q); return mbg.next();
void init(AbstractRevQueue p) throws IOException { try { for (;;) { final RevCommit c = p.next(); if (c == null) break; add(c); } // Setup the condition used by carryOntoOne to detect a late // merge base and produce it on the next round. // recarryTest = branchMask | POPPED; recarryMask = branchMask | POPPED | MERGE_BASE; mergeBaseAncestor = walker.allocFlag(); for (;;) { RevCommit c = _next(); if (c == null) { break; } ret.add(c); } } finally { // Always free the flags immediately. This ensures the flags // will be available for reuse when the walk resets. // walker.freeFlag(branchMask | mergeBaseAncestor); } }
carryOntoHistory(c, carry);
private void carryOntoHistoryInnerLoop(RevCommit c, int carry) { for (;;) { RevCommit[] parents = c.parents; if (parents == null || parents.length == 0) { break; } int e = parents.length - 1; for (int i = 0; i < e; i++) { RevCommit p = parents[i]; if (carryOntoOne(p, carry) == CONTINUE) { // Walking p will be required, buffer p on stack. stack = new CarryStack(stack, p, carry); } // For other results from carryOntoOne: // HAVE_ALL: p has all bits, do nothing to skip that path. // CONTINUE_ON_STACK: callee pushed StackElement for p. } c = parents[e]; if (carryOntoOne(c, carry) != CONTINUE) { break; } } }
private void carryOntoHistory(RevCommit c, int carry) { stack = null; for (;;) { carryOntoHistoryInnerLoop(c, carry); if (stack == null) { break; } c = stack.c; carry = stack.carry; stack = stack.prev; } }