Java Code Examples for org.eclipse.jgit.revwalk.RevCommit#getRawBuffer()

The following examples show how to use org.eclipse.jgit.revwalk.RevCommit#getRawBuffer() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MessageRevFilter.java    From onedev with MIT License 5 votes vote down vote up
static RawCharSequence textFor(RevCommit cmit) {
	final byte[] raw = cmit.getRawBuffer();
	final int b = RawParseUtils.commitMessage(raw, 0);
	if (b < 0)
		return RawCharSequence.EMPTY;
	return new RawCharSequence(raw, b, raw.length);
}
 
Example 2
Source File: CommitterRevFilter.java    From onedev with MIT License 5 votes vote down vote up
static RawCharSequence textFor(RevCommit cmit) {
	final byte[] raw = cmit.getRawBuffer();
	final int b = RawParseUtils.committer(raw, 0);
	if (b < 0)
		return RawCharSequence.EMPTY;
	final int e = RawParseUtils.nextLF(raw, b, '>');
	return new RawCharSequence(raw, b, e);
}
 
Example 3
Source File: AuthorRevFilter.java    From onedev with MIT License 5 votes vote down vote up
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);
}