/** * Parse a name string (e.g. author, committer, tagger) into a PersonIdent. * <p> * Leading spaces won't be trimmed from the string, i.e. will show up in the * parsed name afterwards. * * @param in * the string to parse a name from. * @return the parsed identity or null in case the identity could not be * parsed. */ public static PersonIdent parsePersonIdent(String in) { return parsePersonIdent(Constants.encode(in), 0); }
/** * Parse the tagger identity from the raw buffer. * <p> * This method parses and returns the content of the tagger line, after * taking the tag's character set into account and decoding the tagger * 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. * * @return identity of the tagger (name, email) and the time the tag * was made by the tagger; null if no tagger line was found. */ public final PersonIdent getTaggerIdent() { final byte[] raw = buffer; final int nameB = RawParseUtils.tagger(raw, 0); if (nameB < 0) return null; return RawParseUtils.parsePersonIdent(raw, nameB); }
/** * Parse the committer identity from the raw buffer. * <p> * This method parses and returns the content of the committer line, after * taking the commit's character set into account and decoding the committer * 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 committer (name, email) and the time the commit * was made by the committer; null if no committer line was found. */ public final PersonIdent getCommitterIdent() { final byte[] raw = buffer; final int nameB = RawParseUtils.committer(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); }
/** * Parse a name string (e.g. author, committer, tagger) into a PersonIdent. * <p> * Leading spaces won't be trimmed from the string, i.e. will show up in the * parsed name afterwards. * * @param in * the string to parse a name from. * @return the parsed identity or null in case the identity could not be * parsed. */ public static PersonIdent parsePersonIdent(final String in) { return parsePersonIdent(Constants.encode(in), 0); }
/** * Parse a name string (e.g. author, committer, tagger) into a PersonIdent. * <p> * Leading spaces won't be trimmed from the string, i.e. will show up in the * parsed name afterwards. * * @param in * the string to parse a name from. * @return the parsed identity or null in case the identity could not be * parsed. */ public static PersonIdent parsePersonIdent(String in) { return parsePersonIdent(Constants.encode(in), 0); }
/** * Parse the tagger identity from the raw buffer. * <p> * This method parses and returns the content of the tagger line, after * taking the tag's character set into account and decoding the tagger * 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. * * @return identity of the tagger (name, email) and the time the tag * was made by the tagger; null if no tagger line was found. */ public final PersonIdent getTaggerIdent() { final byte[] raw = buffer; final int nameB = RawParseUtils.tagger(raw, 0); if (nameB < 0) return null; return RawParseUtils.parsePersonIdent(raw, nameB); }
/** * Parse the tagger identity from the raw buffer. * <p> * This method parses and returns the content of the tagger line, after * taking the tag's character set into account and decoding the tagger * 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. * * @return identity of the tagger (name, email) and the time the tag * was made by the tagger; null if no tagger line was found. */ public final PersonIdent getTaggerIdent() { final byte[] raw = buffer; final int nameB = RawParseUtils.tagger(raw, 0); if (nameB < 0) return null; return RawParseUtils.parsePersonIdent(raw, nameB); }
/** * Parse the tagger identity from the raw buffer. * <p> * This method parses and returns the content of the tagger line, after * taking the tag's character set into account and decoding the tagger * 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. * * @return identity of the tagger (name, email) and the time the tag * was made by the tagger; null if no tagger line was found. */ public final PersonIdent getTaggerIdent() { final byte[] raw = buffer; final int nameB = RawParseUtils.tagger(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); }
/** * Parse the committer identity from the raw buffer. * <p> * This method parses and returns the content of the committer line, after * taking the commit's character set into account and decoding the committer * 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 committer (name, email) and the time the commit * was made by the committer; null if no committer line was found. */ public final PersonIdent getCommitterIdent() { final byte[] raw = buffer; final int nameB = RawParseUtils.committer(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 committer identity from the raw buffer. * <p> * This method parses and returns the content of the committer line, after * taking the commit's character set into account and decoding the committer * 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 committer (name, email) and the time the commit * was made by the committer; null if no committer line was found. */ public final PersonIdent getCommitterIdent() { final byte[] raw = buffer; final int nameB = RawParseUtils.committer(raw, 0); if (nameB < 0) return null; return RawParseUtils.parsePersonIdent(raw, nameB); }
/** * Parse the committer identity from the raw buffer. * <p> * This method parses and returns the content of the committer line, after * taking the commit's character set into account and decoding the committer * 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 committer (name, email) and the time the commit * was made by the committer; null if no committer line was found. */ public final PersonIdent getCommitterIdent() { final byte[] raw = buffer; final int nameB = RawParseUtils.committer(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); }
|| RawParseUtils.parsePersonIdent(authorValue) == null) return new CommitStatus( UIText.CommitMessageComponent_MessageInvalidAuthor, || RawParseUtils.parsePersonIdent(committerValue) == null) { return new CommitStatus( UIText.CommitMessageComponent_MessageInvalidCommitter,
authorValid = RawParseUtils.parsePersonIdent(author) != null; if (!authorValid) { MessageDialog.openWarning(getShell(), committerValid = RawParseUtils.parsePersonIdent(committer) != null; if (!committerValid) { MessageDialog.openWarning(getShell(),
CommitCommand commitCmd = new Git(db).commit(); if (author != null) commitCmd.setAuthor(RawParseUtils.parsePersonIdent(author)); if (message != null) commitCmd.setMessage(message);