/** * Locate the first position after the next LF. * <p> * This method stops on the first '\n' it finds. * * @param b * buffer to scan. * @param ptr * position within buffer to start looking for LF at. * @return new position just after the first LF found. */ public static final int nextLF(byte[] b, int ptr) { return next(b, ptr, '\n'); }
if (end == p) break; int equalsIndex = RawParseUtils.next(raw, p, '='); if (equalsIndex == end) break;
ReflogEntryImpl(byte[] raw, int pos) { oldId = ObjectId.fromString(raw, pos); pos += Constants.OBJECT_ID_STRING_LENGTH; if (raw[pos++] != ' ') throw new IllegalArgumentException( JGitText.get().rawLogMessageDoesNotParseAsLogEntry); newId = ObjectId.fromString(raw, pos); pos += Constants.OBJECT_ID_STRING_LENGTH; if (raw[pos++] != ' ') { throw new IllegalArgumentException( JGitText.get().rawLogMessageDoesNotParseAsLogEntry); } who = RawParseUtils.parsePersonIdentOnly(raw, pos); int p0 = RawParseUtils.next(raw, pos, '\t'); if (p0 >= raw.length) comment = ""; // personident has no \t, no comment present //$NON-NLS-1$ else { int p1 = RawParseUtils.nextLF(raw, p0); comment = p1 > p0 ? RawParseUtils.decode(raw, p0, p1 - 1) : ""; //$NON-NLS-1$ } }
if (end == p) break; int equalsIndex = RawParseUtils.next(raw, p, '='); if (equalsIndex == end) break;
AbbreviatedObjectId commit = null; int nextSpace = RawParseUtils.next(buf, tokenBegin, ' '); int tokenCount = 0; while (tokenCount < 3 && nextSpace < lineEnd) { break; case 1: nextSpace = RawParseUtils.next(buf, tokenBegin, ' '); String commitToken = new String(buf, tokenBegin, nextSpace - tokenBegin - 1, UTF_8);
if (end == p) break; int equalsIndex = RawParseUtils.next(raw, p, '='); if (equalsIndex == end) break;
/** * Locate the first position after the next LF. * <p> * This method stops on the first '\n' it finds. * * @param b * buffer to scan. * @param ptr * position within buffer to start looking for LF at. * @return new position just after the first LF found. */ public static final int nextLF(final byte[] b, int ptr) { return next(b, ptr, '\n'); }
ReflogEntryImpl(byte[] raw, int pos) { oldId = ObjectId.fromString(raw, pos); pos += Constants.OBJECT_ID_STRING_LENGTH; if (raw[pos++] != ' ') throw new IllegalArgumentException( JGitText.get().rawLogMessageDoesNotParseAsLogEntry); newId = ObjectId.fromString(raw, pos); pos += Constants.OBJECT_ID_STRING_LENGTH; if (raw[pos++] != ' ') { throw new IllegalArgumentException( JGitText.get().rawLogMessageDoesNotParseAsLogEntry); } who = RawParseUtils.parsePersonIdentOnly(raw, pos); int p0 = RawParseUtils.next(raw, pos, '\t'); if (p0 >= raw.length) comment = ""; // personident has no \t, no comment present //$NON-NLS-1$ else { int p1 = RawParseUtils.nextLF(raw, p0); comment = p1 > p0 ? RawParseUtils.decode(raw, p0, p1 - 1) : ""; //$NON-NLS-1$ } }
/** * Locate the first position after the next LF. * <p> * This method stops on the first '\n' it finds. * * @param b * buffer to scan. * @param ptr * position within buffer to start looking for LF at. * @return new position just after the first LF found. */ public static final int nextLF(byte[] b, int ptr) { return next(b, ptr, '\n'); }
ReflogEntryImpl(byte[] raw, int pos) { oldId = ObjectId.fromString(raw, pos); pos += Constants.OBJECT_ID_STRING_LENGTH; if (raw[pos++] != ' ') throw new IllegalArgumentException( JGitText.get().rawLogMessageDoesNotParseAsLogEntry); newId = ObjectId.fromString(raw, pos); pos += Constants.OBJECT_ID_STRING_LENGTH; if (raw[pos++] != ' ') { throw new IllegalArgumentException( JGitText.get().rawLogMessageDoesNotParseAsLogEntry); } who = RawParseUtils.parsePersonIdentOnly(raw, pos); int p0 = RawParseUtils.next(raw, pos, '\t'); if (p0 >= raw.length) comment = ""; // personident has no \t, no comment present //$NON-NLS-1$ else { int p1 = RawParseUtils.nextLF(raw, p0); comment = p1 > p0 ? RawParseUtils.decode(raw, p0, p1 - 1) : ""; //$NON-NLS-1$ } }
AbbreviatedObjectId commit = null; int nextSpace = RawParseUtils.next(buf, tokenBegin, ' '); int tokenCount = 0; while (tokenCount < 3 && nextSpace < lineEnd) { break; case 1: nextSpace = RawParseUtils.next(buf, tokenBegin, ' '); String commitToken = new String(buf, tokenBegin, nextSpace - tokenBegin - 1, UTF_8);
AbbreviatedObjectId commit = null; int nextSpace = RawParseUtils.next(buf, tokenBegin, ' '); int tokenCount = 0; while (tokenCount < 3 && nextSpace < lineEnd) { break; case 1: nextSpace = RawParseUtils.next(buf, tokenBegin, ' '); String commitToken = new String(buf, tokenBegin, nextSpace - tokenBegin - 1);