/** * Parse the author identity from the raw buffer. * <p> * This method parses and returns the content of the author line, after * taking the commit's character set into account and decoding the author * name and email address. This method is fairly expensive and produces a * new PersonIdent instance on each invocation. Callers should invoke this * method only if they are certain they will be outputting the result, and * should cache the return value for as long as necessary to use all * information from it. * <p> * RevFilter implementations should try to use * {@link org.eclipse.jgit.util.RawParseUtils} to scan the * {@link #getRawBuffer()} instead, as this will allow faster evaluation of * commits. * * @return identity of the author (name, email) and the time the commit was * made by the author; null if no author line was found. */ public final PersonIdent getAuthorIdent() { final byte[] raw = buffer; final int nameB = RawParseUtils.author(raw, 0); if (nameB < 0) return null; return RawParseUtils.parsePersonIdent(raw, nameB); }
static RawCharSequence textFor(RevCommit cmit) { final byte[] raw = cmit.getRawBuffer(); final int b = RawParseUtils.author(raw, 0); if (b < 0) return RawCharSequence.EMPTY; final int e = RawParseUtils.nextLF(raw, b, '>'); return new RawCharSequence(raw, b, e); }
/** * Parse the author identity from the raw buffer. * <p> * This method parses and returns the content of the author line, after * taking the commit's character set into account and decoding the author * name and email address. This method is fairly expensive and produces a * new PersonIdent instance on each invocation. Callers should invoke this * method only if they are certain they will be outputting the result, and * should cache the return value for as long as necessary to use all * information from it. * <p> * RevFilter implementations should try to use * {@link org.eclipse.jgit.util.RawParseUtils} to scan the * {@link #getRawBuffer()} instead, as this will allow faster evaluation of * commits. * * @return identity of the author (name, email) and the time the commit was * made by the author; null if no author line was found. */ public final PersonIdent getAuthorIdent() { final byte[] raw = buffer; final int nameB = RawParseUtils.author(raw, 0); if (nameB < 0) return null; return RawParseUtils.parsePersonIdent(raw, nameB); }
/** * Parse the author identity from the raw buffer. * <p> * This method parses and returns the content of the author line, after * taking the commit's character set into account and decoding the author * name and email address. This method is fairly expensive and produces a * new PersonIdent instance on each invocation. Callers should invoke this * method only if they are certain they will be outputting the result, and * should cache the return value for as long as necessary to use all * information from it. * <p> * RevFilter implementations should try to use {@link RawParseUtils} to scan * the {@link #getRawBuffer()} instead, as this will allow faster evaluation * of commits. * * @return identity of the author (name, email) and the time the commit was * made by the author; null if no author line was found. */ public final PersonIdent getAuthorIdent() { final byte[] raw = buffer; final int nameB = RawParseUtils.author(raw, 0); if (nameB < 0) return null; return RawParseUtils.parsePersonIdent(raw, nameB); }
/** * Parse the author identity from the raw buffer. * <p> * This method parses and returns the content of the author line, after * taking the commit's character set into account and decoding the author * name and email address. This method is fairly expensive and produces a * new PersonIdent instance on each invocation. Callers should invoke this * method only if they are certain they will be outputting the result, and * should cache the return value for as long as necessary to use all * information from it. * <p> * RevFilter implementations should try to use * {@link org.eclipse.jgit.util.RawParseUtils} to scan the * {@link #getRawBuffer()} instead, as this will allow faster evaluation of * commits. * * @return identity of the author (name, email) and the time the commit was * made by the author; null if no author line was found. */ public final PersonIdent getAuthorIdent() { final byte[] raw = buffer; final int nameB = RawParseUtils.author(raw, 0); if (nameB < 0) return null; return RawParseUtils.parsePersonIdent(raw, nameB); }
static RawCharSequence textFor(final RevCommit cmit) { final byte[] raw = cmit.getRawBuffer(); final int b = RawParseUtils.author(raw, 0); if (b < 0) return RawCharSequence.EMPTY; final int e = RawParseUtils.nextLF(raw, b, '>'); return new RawCharSequence(raw, b, e); }
static RawCharSequence textFor(RevCommit cmit) { final byte[] raw = cmit.getRawBuffer(); final int b = RawParseUtils.author(raw, 0); if (b < 0) return RawCharSequence.EMPTY; final int e = RawParseUtils.nextLF(raw, b, '>'); return new RawCharSequence(raw, b, e); }
static RawCharSequence textFor(RevCommit cmit) { final byte[] raw = cmit.getRawBuffer(); final int b = RawParseUtils.author(raw, 0); if (b < 0) return RawCharSequence.EMPTY; final int e = RawParseUtils.nextLF(raw, b, '>'); return new RawCharSequence(raw, b, e); }