/** * Parse an annotated tag from its canonical format. * * This method constructs a temporary revision pool, parses the tag as * supplied, and returns it to the caller. Since the tag was built inside of * a private revision pool its object pointer will be initialized, but will * not have its headers loaded. * * Applications are discouraged from using this API. Callers usually need * more than one object. Use * {@link org.eclipse.jgit.revwalk.RevWalk#parseTag(AnyObjectId)} to obtain * a RevTag from an existing repository. * * @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 org.eclipse.jgit.errors.CorruptObjectException * the tag contains a malformed header that cannot be handled. */ public static RevTag parse(byte[] raw) throws CorruptObjectException { return parse(new RevWalk((ObjectReader) null), raw); }
/** * Parse an annotated tag from its canonical format. * * This method constructs a temporary revision pool, parses the tag as * supplied, and returns it to the caller. Since the tag was built inside of * a private revision pool its object pointer will be initialized, but will * not have its headers loaded. * * Applications are discouraged from using this API. Callers usually need * more than one object. Use * {@link org.eclipse.jgit.revwalk.RevWalk#parseTag(AnyObjectId)} to obtain * a RevTag from an existing repository. * * @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 org.eclipse.jgit.errors.CorruptObjectException * the tag contains a malformed header that cannot be handled. */ public static RevTag parse(byte[] raw) throws CorruptObjectException { return parse(new RevWalk((ObjectReader) null), raw); }
/** * Parse an annotated tag from its canonical format. * * This method constructs a temporary revision pool, parses the tag as * supplied, and returns it to the caller. Since the tag was built inside of * a private revision pool its object pointer will be initialized, but will * not have its headers loaded. * * Applications are discouraged from using this API. Callers usually need * more than one object. Use * {@link org.eclipse.jgit.revwalk.RevWalk#parseTag(AnyObjectId)} to obtain * a RevTag from an existing repository. * * @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 org.eclipse.jgit.errors.CorruptObjectException * the tag contains a malformed header that cannot be handled. */ public static RevTag parse(byte[] raw) throws CorruptObjectException { return parse(new RevWalk((ObjectReader) null), raw); }
/** * Parse an annotated tag from its canonical format. * * This method constructs a temporary revision pool, parses the tag as * supplied, and returns it to the caller. Since the tag was built inside of * a private revision pool its object pointer will be initialized, but will * not have its headers loaded. * * Applications are discouraged from using this API. Callers usually need * more than one object. Use {@link RevWalk#parseTag(AnyObjectId)} to obtain * a RevTag from an existing repository. * * @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(byte[] raw) throws CorruptObjectException { return parse(new RevWalk((ObjectReader) null), raw); }
private Map<String, RevTag> getAnnotatedTagPerTagName( final Optional<String> ignoreTagsIfNameMatches, final List<Ref> tagList) { final Map<String, RevTag> tagPerCommit = newHashMap(); for (final Ref tag : tagList) { if (ignoreTagsIfNameMatches.isPresent()) { if (compile(ignoreTagsIfNameMatches.get()).matcher(tag.getName()).matches()) { continue; } } final Ref peeledTag = this.repository.peel(tag); if (peeledTag.getPeeledObjectId() != null) { try { final RevTag revTag = RevTag.parse(this.repository.open(tag.getObjectId()).getBytes()); tagPerCommit.put(tag.getName(), revTag); } catch (final IOException e) { LOG.error(e.getMessage(), e); } } } return tagPerCommit; }