Exemple #1
0
 @Override
 void parseBody(final RevWalk walk)
     throws MissingObjectException, IncorrectObjectTypeException, IOException {
   if (buffer == null) {
     buffer = walk.getCachedBytes(this);
     if ((flags & PARSED) == 0) parseCanonical(walk, buffer);
   }
 }
Exemple #2
0
 /**
  * Parse an annotated tag from its canonical format.
  *
  * <p>This method inserts the tag directly into the caller supplied revision pool, making it
  * appear as though the tag exists in the repository, even if it doesn't. The repository under the
  * pool is not affected.
  *
  * @param rw the revision pool to allocate the tag within. The tag's object pointer will be
  *     obtained from this pool.
  * @param raw the canonical formatted tag to be parsed.
  * @return the parsed tag, in an isolated revision pool that is not available to the caller.
  * @throws CorruptObjectException the tag contains a malformed header that cannot be handled.
  */
 public static RevTag parse(RevWalk rw, byte[] raw) throws CorruptObjectException {
   ObjectInserter.Formatter fmt = new ObjectInserter.Formatter();
   boolean retain = rw.isRetainBody();
   rw.setRetainBody(true);
   RevTag r = rw.lookupTag(fmt.idFor(Constants.OBJ_TAG, raw));
   r.parseCanonical(rw, raw);
   rw.setRetainBody(retain);
   return r;
 }
Exemple #3
0
 @Override
 void parseHeaders(final RevWalk walk)
     throws MissingObjectException, IncorrectObjectTypeException, IOException {
   parseCanonical(walk, walk.getCachedBytes(this));
 }