Examples of MutableObjectId


Examples of org.eclipse.jgit.lib.MutableObjectId

    return p;
  }

  public CanonicalTreeParser createSubtreeIterator(final ObjectReader reader)
      throws IncorrectObjectTypeException, IOException {
    return createSubtreeIterator(reader, new MutableObjectId());
  }
View Full Code Here

Examples of org.eclipse.jgit.lib.MutableObjectId

    this.db = db;
    this.reader = db.newObjectReader();
    this.inserter = db.newObjectInserter();
    this.noteMerger = noteMerger;
    this.nonNotesMergeStrategy = nonNotesMergeStrategy;
    this.objectIdPrefix = new MutableObjectId();
  }
View Full Code Here

Examples of org.eclipse.jgit.lib.MutableObjectId

  }

  @Override
  Iterator<Note> iterator(AnyObjectId objId, final ObjectReader reader)
      throws IOException {
    final MutableObjectId id = new MutableObjectId();
    id.fromObjectId(objId);

    return new Iterator<Note>() {
      private int cell;

      private Iterator<Note> itr;

      public boolean hasNext() {
        if (itr != null && itr.hasNext())
          return true;

        for (; cell < table.length; cell++) {
          NoteBucket b = table[cell];
          if (b == null)
            continue;

          try {
            id.setByte(prefixLen >> 1, cell);
            itr = b.iterator(id, reader);
          } catch (IOException err) {
            throw new RuntimeException(err);
          }
View Full Code Here

Examples of org.eclipse.jgit.lib.MutableObjectId

    // Due to the uniform distribution of ObjectIds, having less nodes full
    // indicates a good chance the total number of children below here
    // is less than the MAX_SIZE split point. Get a more accurate count.

    MutableObjectId id = new MutableObjectId();
    id.fromObjectId(noteOn);

    int sz = 0;
    for (int cell = 0; cell < 256; cell++) {
      NoteBucket b = table[cell];
      if (b == null)
        continue;

      id.setByte(prefixLen >> 1, cell);
      sz += b.estimateSize(id, or);
      if (LeafBucket.MAX_SIZE < sz)
        break;
    }
    return sz;
View Full Code Here

Examples of org.eclipse.jgit.lib.MutableObjectId

   * @return an iterator that iterates over notes of this NoteMap. Non note
   *         entries are ignored by this iterator.
   */
  public Iterator<Note> iterator() {
    try {
      return root.iterator(new MutableObjectId(), reader);
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

Examples of org.eclipse.jgit.lib.MutableObjectId

   * @throws IOException
   *             the repository cannot be accessed.
   */
  public static List<DiffEntry> scan(TreeWalk walk) throws IOException {
    List<DiffEntry> r = new ArrayList<DiffEntry>();
    MutableObjectId idBuf = new MutableObjectId();
    while (walk.next()) {
      DiffEntry entry = new DiffEntry();

      walk.getObjectId(idBuf, 0);
      entry.oldId = AbbreviatedObjectId.fromObjectId(idBuf);
View Full Code Here

Examples of org.eclipse.jgit.lib.MutableObjectId

    return new LeafBucket(prefixLen);
  }

  private LeafBucket parseLeafTree() {
    final LeafBucket leaf = new LeafBucket(prefixLen);
    final MutableObjectId idBuf = new MutableObjectId();

    for (; !eof(); next(1)) {
      if (parseObjectId(idBuf))
        leaf.parseOneEntry(idBuf, getEntryObjectId());
      else
View Full Code Here

Examples of org.eclipse.jgit.lib.MutableObjectId

      if (!StringUtils.isEmpty(basePath)) {
        PathFilter f = PathFilter.create(basePath);
        tw.setFilter(f);
      }
      tw.setRecursive(true);
      MutableObjectId id = new MutableObjectId();
      ObjectReader reader = tw.getObjectReader();
      long modified = commit.getAuthorIdent().getWhen().getTime();
      while (tw.next()) {
        FileMode mode = tw.getFileMode(0);
        if (mode == FileMode.GITLINK || mode == FileMode.TREE) {
View Full Code Here

Examples of org.eclipse.jgit.lib.MutableObjectId

      if (!StringUtils.isEmpty(basePath)) {
        PathFilter f = PathFilter.create(basePath);
        tw.setFilter(f);
      }
      tw.setRecursive(true);
      MutableObjectId id = new MutableObjectId();
      long modified = commit.getAuthorIdent().getWhen().getTime();
      while (tw.next()) {
        FileMode mode = tw.getFileMode(0);
        if (mode == FileMode.GITLINK || mode == FileMode.TREE) {
          continue;
View Full Code Here

Examples of org.eclipse.jgit.lib.MutableObjectId

    readCurs = objectDatabase.newReader();
    buf = new byte[BUFFER_SIZE];
    tempBuffer = new byte[BUFFER_SIZE];
    hdrBuf = new byte[64];
    objectDigest = Constants.newMessageDigest();
    tempObjectId = new MutableObjectId();
    packDigest = Constants.newMessageDigest();
    checkObjectCollisions = true;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.