/** * Find the next commit that has the given flag set. * * @param flag * the flag to test commits against. * @param begin * first commit index to test at. Applications may wish to begin * at 0, to test the first commit in the list. * @return index of the first commit at or after index <code>begin</code> * that has the specified flag set on it; -1 if no match is found. */ public int indexOf(RevFlag flag, int begin) { while (begin < size()) { int index = begin; Block s = contents; while (s.shift > 0) { final int i = index >> s.shift; index -= i << s.shift; s = (Block) s.contents[i]; } while (begin++ < size() && index < BLOCK_SIZE) { final RevCommit c = (RevCommit) s.contents[index++]; if (c.has(flag)) return begin; } } return -1; }
/** * Remove the given flag from all commits. * <p> * Same as <code>clearFlag(flag, 0, size())</code>, but without the * incremental behavior. * * @param flag * the flag to remove. Applications are responsible for * allocating this flag from the source RevWalk. */ public void clearFlag(RevFlag flag) { clearFlag(flag, 0, size()); }
throws MissingObjectException, IncorrectObjectTypeException, IOException { applyFlag(matching, flag, 0, size());
/** * Find the next commit that has the given flag set. * * @param flag * the flag to test commits against. * @param begin * first commit index to test at. Applications may wish to begin * at <code>size()-1</code>, to test the last commit in the * list. * @return index of the first commit at or before index <code>begin</code> * that has the specified flag set on it; -1 if no match is found. */ public int lastIndexOf(RevFlag flag, int begin) { begin = Math.min(begin, size() - 1); while (begin >= 0) { int index = begin; Block s = contents; while (s.shift > 0) { final int i = index >> s.shift; index -= i << s.shift; s = (Block) s.contents[i]; } while (begin-- >= 0 && index >= 0) { final RevCommit c = (RevCommit) s.contents[index--]; if (c.has(flag)) return begin; } } return -1; }
IncorrectObjectTypeException, IOException { final RevWalk w = flag.getRevWalk(); rangeEnd = Math.min(rangeEnd, size()); while (rangeBegin < rangeEnd) { int index = rangeBegin;
/** * Remove the given flag from all commits. * <p> * Same as <code>clearFlag(flag, 0, size())</code>, but without the * incremental behavior. * * @param flag * the flag to remove. Applications are responsible for * allocating this flag from the source RevWalk. */ public void clearFlag(RevFlag flag) { clearFlag(flag, 0, size()); }
/** * Find the next commit that has the given flag set. * * @param flag * the flag to test commits against. * @param begin * first commit index to test at. Applications may wish to begin * at 0, to test the first commit in the list. * @return index of the first commit at or after index <code>begin</code> * that has the specified flag set on it; -1 if no match is found. */ public int indexOf(RevFlag flag, int begin) { while (begin < size()) { int index = begin; Block s = contents; while (s.shift > 0) { final int i = index >> s.shift; index -= i << s.shift; s = (Block) s.contents[i]; } while (begin++ < size() && index < BLOCK_SIZE) { final RevCommit c = (RevCommit) s.contents[index++]; if (c.has(flag)) return begin; } } return -1; }
/** * Remove the given flag from all commits. * <p> * Same as <code>clearFlag(flag, 0, size())</code>, but without the * incremental behavior. * * @param flag * the flag to remove. Applications are responsible for * allocating this flag from the source RevWalk. */ public void clearFlag(final RevFlag flag) { clearFlag(flag, 0, size()); }
/** * Remove the given flag from all commits. * <p> * Same as <code>clearFlag(flag, 0, size())</code>, but without the * incremental behavior. * * @param flag * the flag to remove. Applications are responsible for * allocating this flag from the source RevWalk. */ public void clearFlag(RevFlag flag) { clearFlag(flag, 0, size()); }
/** * Find the next commit that has the given flag set. * * @param flag * the flag to test commits against. * @param begin * first commit index to test at. Applications may wish to begin * at 0, to test the first commit in the list. * @return index of the first commit at or after index <code>begin</code> * that has the specified flag set on it; -1 if no match is found. */ public int indexOf(final RevFlag flag, int begin) { while (begin < size()) { int index = begin; Block s = contents; while (s.shift > 0) { final int i = index >> s.shift; index -= i << s.shift; s = (Block) s.contents[i]; } while (begin++ < size() && index < BLOCK_SIZE) { final RevCommit c = (RevCommit) s.contents[index++]; if (c.has(flag)) return begin; } } return -1; }
/** * Find the next commit that has the given flag set. * * @param flag * the flag to test commits against. * @param begin * first commit index to test at. Applications may wish to begin * at 0, to test the first commit in the list. * @return index of the first commit at or after index <code>begin</code> * that has the specified flag set on it; -1 if no match is found. */ public int indexOf(RevFlag flag, int begin) { while (begin < size()) { int index = begin; Block s = contents; while (s.shift > 0) { final int i = index >> s.shift; index -= i << s.shift; s = (Block) s.contents[i]; } while (begin++ < size() && index < BLOCK_SIZE) { final RevCommit c = (RevCommit) s.contents[index++]; if (c.has(flag)) return begin; } } return -1; }
/** * Find the next commit that has the given flag set. * * @param flag * the flag to test commits against. * @param begin * first commit index to test at. Applications may wish to begin * at <code>size()-1</code>, to test the last commit in the * list. * @return index of the first commit at or before index <code>begin</code> * that has the specified flag set on it; -1 if no match is found. */ public int lastIndexOf(RevFlag flag, int begin) { begin = Math.min(begin, size() - 1); while (begin >= 0) { int index = begin; Block s = contents; while (s.shift > 0) { final int i = index >> s.shift; index -= i << s.shift; s = (Block) s.contents[i]; } while (begin-- >= 0 && index >= 0) { final RevCommit c = (RevCommit) s.contents[index--]; if (c.has(flag)) return begin; } } return -1; }
throws MissingObjectException, IncorrectObjectTypeException, IOException { applyFlag(matching, flag, 0, size());
/** * Find the next commit that has the given flag set. * * @param flag * the flag to test commits against. * @param begin * first commit index to test at. Applications may wish to begin * at <code>size()-1</code>, to test the last commit in the * list. * @return index of the first commit at or before index <code>begin</code> * that has the specified flag set on it; -1 if no match is found. */ public int lastIndexOf(final RevFlag flag, int begin) { begin = Math.min(begin, size() - 1); while (begin >= 0) { int index = begin; Block s = contents; while (s.shift > 0) { final int i = index >> s.shift; index -= i << s.shift; s = (Block) s.contents[i]; } while (begin-- >= 0 && index >= 0) { final RevCommit c = (RevCommit) s.contents[index--]; if (c.has(flag)) return begin; } } return -1; }
throws MissingObjectException, IncorrectObjectTypeException, IOException { applyFlag(matching, flag, 0, size());
/** * Find the next commit that has the given flag set. * * @param flag * the flag to test commits against. * @param begin * first commit index to test at. Applications may wish to begin * at <code>size()-1</code>, to test the last commit in the * list. * @return index of the first commit at or before index <code>begin</code> * that has the specified flag set on it; -1 if no match is found. */ public int lastIndexOf(RevFlag flag, int begin) { begin = Math.min(begin, size() - 1); while (begin >= 0) { int index = begin; Block s = contents; while (s.shift > 0) { final int i = index >> s.shift; index -= i << s.shift; s = (Block) s.contents[i]; } while (begin-- >= 0 && index >= 0) { final RevCommit c = (RevCommit) s.contents[index--]; if (c.has(flag)) return begin; } } return -1; }
throws MissingObjectException, IncorrectObjectTypeException, IOException { applyFlag(matching, flag, 0, size());
IncorrectObjectTypeException, IOException { final RevWalk w = flag.getRevWalk(); rangeEnd = Math.min(rangeEnd, size()); while (rangeBegin < rangeEnd) { int index = rangeBegin;
IncorrectObjectTypeException, IOException { final RevWalk w = flag.getRevWalk(); rangeEnd = Math.min(rangeEnd, size()); while (rangeBegin < rangeEnd) { int index = rangeBegin;
IncorrectObjectTypeException, IOException { final RevWalk w = flag.getRevWalk(); rangeEnd = Math.min(rangeEnd, size()); while (rangeBegin < rangeEnd) { int index = rangeBegin;