code stringlengths 23 201k | docstring stringlengths 17 96.2k | func_name stringlengths 0 235 | language stringclasses 1
value | repo stringlengths 8 72 | path stringlengths 11 317 | url stringlengths 57 377 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
@Override
public String getContentType()
{
return _contentType;
} | Sends a response with a given redirection code.
@param code the redirect status code
@param location the location to send in {@code Location} headers
@param consumeAll if True, consume any HTTP/1 request input before doing the redirection. If the input cannot
be consumed without blocking, then add a `Connection: close... | getContentType | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
@Override
public ServletOutputStream getOutputStream() throws IOException
{
if (_outputType == OutputType.WRITER)
throw new IllegalStateException("WRITER");
_outputType = OutputType.STREAM;
return _out;
} | Sends a response with a given redirection code.
@param code the redirect status code
@param location the location to send in {@code Location} headers
@param consumeAll if True, consume any HTTP/1 request input before doing the redirection. If the input cannot
be consumed without blocking, then add a `Connection: close... | getOutputStream | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
public boolean isWriting()
{
return _outputType == OutputType.WRITER;
} | Sends a response with a given redirection code.
@param code the redirect status code
@param location the location to send in {@code Location} headers
@param consumeAll if True, consume any HTTP/1 request input before doing the redirection. If the input cannot
be consumed without blocking, then add a `Connection: close... | isWriting | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
public boolean isStreaming()
{
return _outputType == OutputType.STREAM;
} | Sends a response with a given redirection code.
@param code the redirect status code
@param location the location to send in {@code Location} headers
@param consumeAll if True, consume any HTTP/1 request input before doing the redirection. If the input cannot
be consumed without blocking, then add a `Connection: close... | isStreaming | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
public boolean isWritingOrStreaming()
{
return isWriting() || isStreaming();
} | Sends a response with a given redirection code.
@param code the redirect status code
@param location the location to send in {@code Location} headers
@param consumeAll if True, consume any HTTP/1 request input before doing the redirection. If the input cannot
be consumed without blocking, then add a `Connection: close... | isWritingOrStreaming | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
@Override
public PrintWriter getWriter() throws IOException
{
if (_outputType == OutputType.STREAM)
throw new IllegalStateException("STREAM");
if (_outputType == OutputType.NONE)
{
/* get encoding from Content-Type header */
String encoding = _characterEncoding;
if (encoding == null)
{
if (_... | Sends a response with a given redirection code.
@param code the redirect status code
@param location the location to send in {@code Location} headers
@param consumeAll if True, consume any HTTP/1 request input before doing the redirection. If the input cannot
be consumed without blocking, then add a `Connection: close... | getWriter | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
@Override
public void setContentLength(int len)
{
// Protect from setting after committed as default handling
// of a servlet HEAD request ALWAYS sets _content length, even
// if the getHandling committed the response!
if (isCommitted() || !isMutable())
return;
if (len > 0)
{
long written = _out.ge... | Sends a response with a given redirection code.
@param code the redirect status code
@param location the location to send in {@code Location} headers
@param consumeAll if True, consume any HTTP/1 request input before doing the redirection. If the input cannot
be consumed without blocking, then add a `Connection: close... | setContentLength | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
public long getContentLength()
{
return _contentLength;
} | Sends a response with a given redirection code.
@param code the redirect status code
@param location the location to send in {@code Location} headers
@param consumeAll if True, consume any HTTP/1 request input before doing the redirection. If the input cannot
be consumed without blocking, then add a `Connection: close... | getContentLength | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
public boolean isAllContentWritten(long written)
{
return (_contentLength >= 0 && written >= _contentLength);
} | Sends a response with a given redirection code.
@param code the redirect status code
@param location the location to send in {@code Location} headers
@param consumeAll if True, consume any HTTP/1 request input before doing the redirection. If the input cannot
be consumed without blocking, then add a `Connection: close... | isAllContentWritten | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
public boolean isContentComplete(long written)
{
return (_contentLength < 0 || written >= _contentLength);
} | Sends a response with a given redirection code.
@param code the redirect status code
@param location the location to send in {@code Location} headers
@param consumeAll if True, consume any HTTP/1 request input before doing the redirection. If the input cannot
be consumed without blocking, then add a `Connection: close... | isContentComplete | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
public void closeOutput() throws IOException
{
if (_outputType == OutputType.WRITER)
_writer.close();
else
_out.close();
} | Sends a response with a given redirection code.
@param code the redirect status code
@param location the location to send in {@code Location} headers
@param consumeAll if True, consume any HTTP/1 request input before doing the redirection. If the input cannot
be consumed without blocking, then add a `Connection: close... | closeOutput | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
@Deprecated
public void completeOutput() throws IOException
{
closeOutput();
} | close the output
@deprecated Use {@link #closeOutput()} | completeOutput | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
public void completeOutput(Callback callback)
{
if (_outputType == OutputType.WRITER)
_writer.complete(callback);
else
_out.complete(callback);
} | close the output
@deprecated Use {@link #closeOutput()} | completeOutput | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
public long getLongContentLength()
{
return _contentLength;
} | close the output
@deprecated Use {@link #closeOutput()} | getLongContentLength | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
public void setLongContentLength(long len)
{
// Protect from setting after committed as default handling
// of a servlet HEAD request ALWAYS sets _content length, even
// if the getHandling committed the response!
if (isCommitted() || !isMutable())
return;
_contentLength = len;
_fields.putLongField(Http... | close the output
@deprecated Use {@link #closeOutput()} | setLongContentLength | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
@Override
public void setContentLengthLong(long length)
{
setLongContentLength(length);
} | close the output
@deprecated Use {@link #closeOutput()} | setContentLengthLong | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
@Override
public void setCharacterEncoding(String encoding)
{
setCharacterEncoding(encoding, EncodingFrom.SET_CHARACTER_ENCODING);
} | close the output
@deprecated Use {@link #closeOutput()} | setCharacterEncoding | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
private void setCharacterEncoding(String encoding, EncodingFrom from)
{
if (!isMutable() || isWriting())
return;
if (_outputType != OutputType.WRITER && !isCommitted())
{
if (encoding == null)
{
_encodingFrom = EncodingFrom.NOT_SET;
// Clear any encoding.
if (_characterEncoding != null)
... | close the output
@deprecated Use {@link #closeOutput()} | setCharacterEncoding | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
@Override
public void setContentType(String contentType)
{
if (isCommitted() || !isMutable())
return;
if (contentType == null)
{
if (isWriting() && _characterEncoding != null)
throw new IllegalSelectorException();
if (_locale == null)
_characterEncoding = null;
_mimeType = null;
_conten... | close the output
@deprecated Use {@link #closeOutput()} | setContentType | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
@Override
public void setBufferSize(int size)
{
if (isCommitted())
throw new IllegalStateException("cannot set buffer size after response is in committed state");
if (getContentCount() > 0)
throw new IllegalStateException("cannot set buffer size after response has " + getContentCount() + " bytes already wri... | close the output
@deprecated Use {@link #closeOutput()} | setBufferSize | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
@Override
public int getBufferSize()
{
return _out.getBufferSize();
} | close the output
@deprecated Use {@link #closeOutput()} | getBufferSize | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
@Override
public void flushBuffer() throws IOException
{
if (!_out.isClosed())
_out.flush();
} | close the output
@deprecated Use {@link #closeOutput()} | flushBuffer | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
@Override
public void reset()
{
_status = 200;
_reason = null;
_out.resetBuffer();
_outputType = OutputType.NONE;
_contentLength = -1;
_contentType = null;
_mimeType = null;
_characterEncoding = null;
_encodingFrom = EncodingFrom.NOT_SET;
_trailers = null;
// Clear all response headers
_field... | close the output
@deprecated Use {@link #closeOutput()} | reset | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
public void resetContent()
{
_out.resetBuffer();
_outputType = OutputType.NONE;
_contentLength = -1;
_contentType = null;
_mimeType = null;
_characterEncoding = null;
_encodingFrom = EncodingFrom.NOT_SET;
// remove the content related response headers and keep all others
for (Iterator<HttpField> i =... | close the output
@deprecated Use {@link #closeOutput()} | resetContent | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
public void resetForForward()
{
resetBuffer();
_outputType = OutputType.NONE;
} | close the output
@deprecated Use {@link #closeOutput()} | resetForForward | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
@Override
public void resetBuffer()
{
_out.resetBuffer();
_out.reopen();
} | close the output
@deprecated Use {@link #closeOutput()} | resetBuffer | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
public void setTrailers(Supplier<HttpFields> trailers)
{
this._trailers = trailers;
} | close the output
@deprecated Use {@link #closeOutput()} | setTrailers | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
public Supplier<HttpFields> getTrailers()
{
return _trailers;
} | close the output
@deprecated Use {@link #closeOutput()} | getTrailers | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
protected MetaData.Response newResponseMetaData()
{
MetaData.Response info = new MetaData.Response(_channel.getRequest().getHttpVersion(), getStatus(), getReason(), _fields, getLongContentLength());
info.setTrailerSupplier(getTrailers());
return info;
} | close the output
@deprecated Use {@link #closeOutput()} | newResponseMetaData | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jetty/server/Response.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jetty/server/Response.java | MIT |
@Override
int outputType() {
return outputType;
} | Remove all entries from this queue. | outputType | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/AbstractRevQueue.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/AbstractRevQueue.java | MIT |
public long getCountOfBitmapIndexMisses() {
return countOfBitmapIndexMisses;
} | Return the number of objects that had to be walked because they were not covered by a
bitmap.
@return the number of objects that had to be walked because they were not covered by a
bitmap. | getCountOfBitmapIndexMisses | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/BitmapWalker.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/BitmapWalker.java | MIT |
public BitmapBuilder findObjects(Iterable<? extends ObjectId> start, BitmapBuilder seen,
boolean ignoreMissing)
throws MissingObjectException, IncorrectObjectTypeException,
IOException {
if (!ignoreMissing) {
return findObjectsWalk(start, seen, false);
}
try {
return findObjectsWalk(start, see... | Return, as a bitmap, the objects reachable from the objects in start.
@param start
the objects to start the object traversal from.
@param seen
the objects to skip if encountered during traversal.
@param ignoreMissing
true to ignore missing objects, false otherwise.
@return as a bitmap,... | findObjects | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/BitmapWalker.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/BitmapWalker.java | MIT |
private BitmapBuilder findObjectsWalk(Iterable<? extends ObjectId> start, BitmapBuilder seen,
boolean ignoreMissingStart)
throws MissingObjectException, IncorrectObjectTypeException,
IOException {
walker.reset();
final BitmapBuilder bitmapResult = bitmapIndex.newBitmapBuilder();
for (ObjectId obj : star... | Return, as a bitmap, the objects reachable from the objects in start.
@param start
the objects to start the object traversal from.
@param seen
the objects to skip if encountered during traversal.
@param ignoreMissing
true to ignore missing objects, false otherwise.
@return as a bitmap,... | findObjectsWalk | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/BitmapWalker.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/BitmapWalker.java | MIT |
@Override
public final boolean include(ObjectWalk walker, AnyObjectId objid)
throws MissingObjectException, IncorrectObjectTypeException,
IOException {
return !bitmap.contains(objid);
} | Filter that excludes objects already in the given bitmap. | include | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/BitmapWalker.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/BitmapWalker.java | MIT |
boolean isFull() {
return tailIndex == BLOCK_SIZE;
} | Next free entry in {@link #objects} for addition at. | isFull | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/BlockObjQueue.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/BlockObjQueue.java | MIT |
boolean isEmpty() {
return headIndex == tailIndex;
} | Next free entry in {@link #objects} for addition at. | isEmpty | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/BlockObjQueue.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/BlockObjQueue.java | MIT |
void add(RevObject c) {
objects[tailIndex++] = c;
} | Next free entry in {@link #objects} for addition at. | add | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/BlockObjQueue.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/BlockObjQueue.java | MIT |
RevObject pop() {
return objects[headIndex++];
} | Next free entry in {@link #objects} for addition at. | pop | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/BlockObjQueue.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/BlockObjQueue.java | MIT |
void clear() {
next = null;
headIndex = 0;
tailIndex = 0;
} | Next free entry in {@link #objects} for addition at. | clear | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/BlockObjQueue.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/BlockObjQueue.java | MIT |
@Override
int outputType() {
return pending.outputType() | HAS_UNINTERESTING;
} | @param w
@param s Parent generator
@throws MissingObjectException
@throws IncorrectObjectTypeException
@throws IOException | outputType | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/DepthGenerator.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/DepthGenerator.java | MIT |
@Override
void shareFreeList(BlockRevQueue q) {
pending.shareFreeList(q);
} | @param w
@param s Parent generator
@throws MissingObjectException
@throws IncorrectObjectTypeException
@throws IOException | shareFreeList | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/DepthGenerator.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/DepthGenerator.java | MIT |
@Override
RevCommit next() throws MissingObjectException,
IncorrectObjectTypeException, IOException {
// Perform a breadth-first descent into the commit graph,
// marking depths as we go. This means that if a commit is
// reachable by more than one route, we are guaranteed to
// arrive by the shortest rout... | @param w
@param s Parent generator
@throws MissingObjectException
@throws IncorrectObjectTypeException
@throws IOException | next | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/DepthGenerator.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/DepthGenerator.java | MIT |
default List<ObjectId> getDeepenNots() {
return Collections.emptyList();
} | @return the objects specified by the client using --shallow-exclude
@since 5.2 | getDeepenNots | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/DepthWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/DepthWalk.java | MIT |
public String getPath() {
return path.getPath();
} | Get the path this filter matches.
@return the path this filter matches. | getPath | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/FollowFilter.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/FollowFilter.java | MIT |
public RenameCallback getRenameCallback() {
return renameCallback;
} | Get the callback to which renames are reported.
@return the callback to which renames are reported, or <code>null</code>
if none | getRenameCallback | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/FollowFilter.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/FollowFilter.java | MIT |
public void setRenameCallback(RenameCallback callback) {
renameCallback = callback;
} | Sets the callback to which renames shall be reported.
@param callback
the callback to use | setRenameCallback | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/FollowFilter.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/FollowFilter.java | MIT |
public String getName() {
return name;
} | Get name of this footer line.
@return name of this footer line. | getName | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/FooterKey.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/FooterKey.java | MIT |
public boolean matches(FooterKey key) {
final byte[] kRaw = key.raw;
final int len = kRaw.length;
int bPtr = keyStart;
if (keyEnd - bPtr != len)
return false;
for (int kPtr = 0; kPtr < len;) {
byte b = buffer[bPtr++];
if ('A' <= b && b <= 'Z')
b += (byte) ('a' - 'A');
if (b != kRaw[kPtr++])
... | Whether keys match
@param key
key to test this line's key name against.
@return true if {@code key.getName().equalsIgnorecase(getKey())}. | matches | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/FooterLine.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/FooterLine.java | MIT |
public String getEmailAddress() {
final int lt = RawParseUtils.nextLF(buffer, valStart, '<');
if (valEnd <= lt) {
final int at = RawParseUtils.nextLF(buffer, valStart, '@');
if (valStart < at && at < valEnd)
return getValue();
return null;
}
final int gt = RawParseUtils.nextLF(buffer, lt, '>');
i... | Extract the email address (if present) from the footer.
<p>
If there is an email address looking string inside of angle brackets
(e.g. "<a@b>"), the return value is the part extracted from inside the
brackets. If no brackets are found, then {@link #getValue()} is returned
if the value contains an '@' sign. Otherw... | getEmailAddress | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/FooterLine.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/FooterLine.java | MIT |
void shareFreeList(BlockRevQueue q) {
// Do nothing by default.
} | Connect the supplied queue to this generator's own free list (if any).
@param q
another FIFO queue that wants to share our queue's free list. | shareFreeList | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/Generator.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/Generator.java | MIT |
@Override
public boolean shouldVisit(RevObject o) {
return (o.flags & SEEN) == 0;
} | The default visitation policy: causes all objects to be visited exactly
once.
@since 5.4 | shouldVisit | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | MIT |
@Override
public void visited(RevObject o) {
o.flags |= SEEN;
} | The default visitation policy: causes all objects to be visited exactly
once.
@since 5.4 | visited | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | MIT |
public ObjectFilter getObjectFilter() {
return objectFilter;
} | Get the currently configured object filter.
@return the current filter. Never null as a filter is always needed.
@since 4.0 | getObjectFilter | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | MIT |
public void setVisitationPolicy(VisitationPolicy policy) {
assertNotStarted();
visitationPolicy = requireNonNull(policy);
} | Sets the visitation policy to use during this walk.
@param policy
the {@code VisitationPolicy} to use
@since 5.4 | setVisitationPolicy | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | MIT |
public void skipTree() {
if (currVisit != null) {
currVisit.ptr = currVisit.buf.length;
}
} | Skips the current tree such that {@link #nextObject()} does not return
any objects inside it. This should be called right after
{@link #nextObject()} returns the tree.
@since 5.4 | skipTree | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | MIT |
public RevObject nextObject() throws MissingObjectException,
IncorrectObjectTypeException, IOException {
pathLen = 0;
TreeVisit tv = currVisit;
while (tv != null) {
byte[] buf = tv.buf;
for (int ptr = tv.ptr; ptr < buf.length;) {
int startPtr = ptr;
ptr = findObjectId(buf, ptr);
idBuffer.fro... | Pop the next most recent object.
@return next most recent object; null if traversal is over.
@throws org.eclipse.jgit.errors.MissingObjectException
one or more of the next objects are not available from the
object database, but were thought to be candidates for
traversal. This usual... | nextObject | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | MIT |
private static int findObjectId(byte[] buf, int ptr) {
// Skip over the mode and name until the NUL before the ObjectId
// can be located. Skip the NUL as the function returns.
for (;;) {
if (buf[++ptr] == 0) return ++ptr;
if (buf[++ptr] == 0) return ++ptr;
if (buf[++ptr] == 0) return ++ptr;
if (buf[+... | Pop the next most recent object.
@return next most recent object; null if traversal is over.
@throws org.eclipse.jgit.errors.MissingObjectException
one or more of the next objects are not available from the
object database, but were thought to be candidates for
traversal. This usual... | findObjectId | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | MIT |
private static int parseMode(byte[] buf, int startPtr, int recEndPtr, TreeVisit tv) {
int mode = buf[startPtr] - '0';
for (;;) {
byte c = buf[++startPtr];
if (' ' == c)
break;
mode <<= 3;
mode += c - '0';
c = buf[++startPtr];
if (' ' == c)
break;
mode <<= 3;
mode += c - '0';
c =... | Pop the next most recent object.
@return next most recent object; null if traversal is over.
@throws org.eclipse.jgit.errors.MissingObjectException
one or more of the next objects are not available from the
object database, but were thought to be candidates for
traversal. This usual... | parseMode | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | MIT |
public void checkConnectivity() throws MissingObjectException,
IncorrectObjectTypeException, IOException {
for (;;) {
final RevCommit c = next();
if (c == null)
break;
}
for (;;) {
final RevObject o = nextObject();
if (o == null)
break;
if (o instanceof RevBlob && !reader.has(o))
thr... | Verify all interesting objects are available, and reachable.
<p>
Callers should populate starting points and ending points with
{@link #markStart(RevObject)} and {@link #markUninteresting(RevObject)}
and then use this method to verify all objects between those two points
exist in the repository and are readable.
<p>
Th... | checkConnectivity | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | MIT |
public String getPathString() {
if (pathLen == 0) {
pathLen = updatePathBuf(currVisit);
if (pathLen == 0)
return null;
}
return RawParseUtils.decode(pathBuf, 0, pathLen);
} | Get the current object's complete path.
<p>
This method is not very efficient and is primarily meant for debugging
and final output generation. Applications should try to avoid calling it,
and if invoked do so only once per interesting entry, where the name is
absolutely required for correct function.
@return complete... | getPathString | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | MIT |
public int getTreeDepth() {
if (currVisit == null) {
return 0;
}
return currVisit.depth;
} | @return the current traversal depth from the root tree object
@since 5.4 | getTreeDepth | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | MIT |
public int getPathHashCode() {
TreeVisit tv = currVisit;
if (tv == null)
return 0;
int nameEnd = tv.nameEnd;
if (nameEnd == 0) {
// When nameEnd == 0 the subtree is itself the current path
// being visited. The name hash must be obtained from its
// parent tree. If there is no parent, this is a roo... | Get the current object's path hash code.
<p>
This method computes a hash code on the fly for this path, the hash is
suitable to cluster objects that may have similar paths together.
@return path hash code; any integer may be returned. | getPathHashCode | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | MIT |
public byte[] getPathBuffer() {
if (pathLen == 0)
pathLen = updatePathBuf(currVisit);
return pathBuf;
} | Get the internal buffer holding the current path.
@return the internal buffer holding the current path. | getPathBuffer | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | MIT |
public int getPathLength() {
if (pathLen == 0)
pathLen = updatePathBuf(currVisit);
return pathLen;
} | Get length of the path in {@link #getPathBuffer()}.
@return length of the path in {@link #getPathBuffer()}. | getPathLength | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | MIT |
private int updatePathBuf(TreeVisit tv) {
if (tv == null)
return 0;
// If nameEnd == 0 this tree has not yet contributed an entry.
// Update only for the parent, which if null will be empty.
int nameEnd = tv.nameEnd;
if (nameEnd == 0)
return updatePathBuf(tv.parent);
int ptr = tv.pathLen;
if (ptr ... | Get length of the path in {@link #getPathBuffer()}.
@return length of the path in {@link #getPathBuffer()}. | updatePathBuf | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | MIT |
private void growPathBuf(int ptr) {
byte[] newBuf = new byte[pathBuf.length << 1];
System.arraycopy(pathBuf, 0, newBuf, 0, ptr);
pathBuf = newBuf;
} | Get length of the path in {@link #getPathBuffer()}.
@return length of the path in {@link #getPathBuffer()}. | growPathBuf | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/ObjectWalk.java | MIT |
public final List<String> getFooterLines(String keyName) {
return getFooterLines(new FooterKey(keyName));
} | Get the values of all footer lines with the given key.
@param keyName
footer key to find values of, case insensitive.
@return values of footers with key of {@code keyName}, ordered by their
order of appearance. Duplicates may be returned if the same
footer appeared more than once. Empty list... | getFooterLines | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevCommit.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevCommit.java | MIT |
public final List<String> getFooterLines(FooterKey keyName) {
final List<FooterLine> src = getFooterLines();
if (src.isEmpty())
return Collections.emptyList();
final ArrayList<String> r = new ArrayList<>(src.size());
for (FooterLine f : src) {
if (f.matches(keyName))
r.add(f.getValue());
}
return ... | Get the values of all footer lines with the given key.
@param keyName
footer key to find values of, case insensitive.
@return values of footers with key of {@code keyName}, ordered by their
order of appearance. Duplicates may be returned if the same
footer appeared more than once. Empty list... | getFooterLines | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevCommit.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevCommit.java | MIT |
public void source(RevWalk w) {
walker = w;
} | Set the revision walker this list populates itself from.
@param w
the walker to populate from.
@see #fillTo(int) | source | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevCommitList.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevCommitList.java | MIT |
public boolean isPending() {
return walker != null;
} | Is this list still pending more items?
@return true if {@link #fillTo(int)} might be able to extend the list
size when called. | isPending | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevCommitList.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevCommitList.java | MIT |
public RevWalk getRevWalk() {
return walker;
} | Get the revision walk instance this flag was created from.
@return the walker this flag was allocated out of, and belongs to. | getRevWalk | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevFlag.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevFlag.java | MIT |
public final ObjectId getId() {
return this;
} | Get the name of this object.
@return unique hash of this object. | getId | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevObject.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevObject.java | MIT |
public final boolean has(RevFlag flag) {
return (flags & flag.mask) != 0;
} | Test to see if the flag has been set on this object.
@param flag
the flag to test.
@return true if the flag has been added to this object; false if not. | has | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevObject.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevObject.java | MIT |
public final boolean hasAny(RevFlagSet set) {
return (flags & set.mask) != 0;
} | Test to see if any flag in the set has been set on this object.
@param set
the flags to test.
@return true if any flag in the set has been added to this object; false
if not. | hasAny | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevObject.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevObject.java | MIT |
public final boolean hasAll(RevFlagSet set) {
return (flags & set.mask) == set.mask;
} | Test to see if all flags in the set have been set on this object.
@param set
the flags to test.
@return true if all flags of the set have been added to this object;
false if some or none have been added. | hasAll | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevObject.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevObject.java | MIT |
public final void add(RevFlag flag) {
flags |= flag.mask;
} | Add a flag to this object.
<p>
If the flag is already set on this object then the method has no effect.
@param flag
the flag to mark on this object, for later testing. | add | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevObject.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevObject.java | MIT |
public final void add(RevFlagSet set) {
flags |= set.mask;
} | Add a set of flags to this object.
@param set
the set of flags to mark on this object, for later testing. | add | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevObject.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevObject.java | MIT |
public final void remove(RevFlag flag) {
flags &= ~flag.mask;
} | Remove a flag from this object.
<p>
If the flag is not set on this object then the method has no effect.
@param flag
the flag to remove from this object. | remove | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevObject.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevObject.java | MIT |
public final void remove(RevFlagSet set) {
flags &= ~set.mask;
} | Remove a set of flags from this object.
@param set
the flag to remove from this object. | remove | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevObject.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevObject.java | MIT |
protected void appendCoreFlags(StringBuilder s) {
s.append((flags & RevWalk.TOPO_DELAY) != 0 ? 'o' : '-');
s.append((flags & RevWalk.TOPO_QUEUED) != 0 ? 'q' : '-');
s.append((flags & RevWalk.TEMP_MARK) != 0 ? 't' : '-');
s.append((flags & RevWalk.REWRITE) != 0 ? 'r' : '-');
s.append((flags & RevWalk.UNINTERES... | Append a debug description of core RevFlags to a buffer.
@param s
buffer to append a debug description of core RevFlags onto. | appendCoreFlags | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevObject.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevObject.java | MIT |
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 discour... | parse | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | MIT |
public static RevTag parse(RevWalk rw, byte[] raw)
throws CorruptObjectException {
try (ObjectInserter.Formatter fmt = new ObjectInserter.Formatter()) {
RevTag r = rw.lookupTag(fmt.idFor(Constants.OBJ_TAG, raw));
r.parseCanonical(rw, raw);
r.buffer = raw;
return r;
}
} | Parse an annotated tag from its canonical format.
<p>
This method inserts the tag directly into the caller supplied revision
pool, making it appear as though the tag exists in the repository, even
if it doesn't. The repository under the pool is not affected.
<p>
The body of the tag (message, tagger, signature) is alway... | parse | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | MIT |
@Override
void parseHeaders(RevWalk walk) throws MissingObjectException,
IncorrectObjectTypeException, IOException {
parseCanonical(walk, walk.getCachedBytes(this));
} | Create a new tag reference.
@param id
object name for the tag. | parseHeaders | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | MIT |
@Override
void parseBody(RevWalk walk) throws MissingObjectException,
IncorrectObjectTypeException, IOException {
if (buffer == null) {
buffer = walk.getCachedBytes(this);
if ((flags & PARSED) == 0)
parseCanonical(walk, buffer);
}
} | Create a new tag reference.
@param id
object name for the tag. | parseBody | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | MIT |
void parseCanonical(RevWalk walk, byte[] rawTag)
throws CorruptObjectException {
final MutableInteger pos = new MutableInteger();
final int oType;
pos.value = 53; // "object $sha1\ntype "
oType = Constants.decodeTypeString(this, rawTag, (byte) '\n', pos);
walk.idBuffer.fromString(rawTag, 7);
object = wa... | Create a new tag reference.
@param id
object name for the tag. | parseCanonical | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | MIT |
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 i... | getTaggerIdent | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | MIT |
private static int nextStart(byte[] prefix, byte[] buffer, int from) {
int stop = buffer.length - prefix.length + 1;
int ptr = from;
if (ptr > 0) {
ptr = RawParseUtils.nextLF(buffer, ptr - 1);
}
while (ptr < stop) {
int lineStart = ptr;
boolean found = true;
for (byte element : prefix) {
if (e... | 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 i... | nextStart | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | MIT |
private int getSignatureStart() {
byte[] raw = buffer;
int msgB = RawParseUtils.tagMessage(raw, 0);
if (msgB < 0) {
return msgB;
}
// Find the last signature start and return the rest
int start = nextStart(hSignature, raw, msgB);
if (start < 0) {
return start;
}
int next = RawParseUtils.nextLF(r... | 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 i... | getSignatureStart | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | MIT |
@Nullable
public final byte[] getRawGpgSignature() {
byte[] raw = buffer;
int start = getSignatureStart();
if (start < 0) {
return null;
}
return Arrays.copyOfRange(raw, start, raw.length);
} | Parse the GPG signature from the raw buffer.
@return contents of the GPG signature; {@code null} if the tag was not
signed.
@since 5.11 | getRawGpgSignature | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | MIT |
public final String getFullMessage() {
byte[] raw = buffer;
int msgB = RawParseUtils.tagMessage(raw, 0);
if (msgB < 0) {
return ""; //$NON-NLS-1$
}
int signatureStart = getSignatureStart();
int end = signatureStart < 0 ? raw.length : signatureStart;
if (end == msgB) {
return ""; //$NON-NLS-1$
}
... | Parse the complete tag message and decode it to a string.
<p>
This method parses and returns the message portion of the tag buffer,
after taking the tag's character set into account and decoding the buffer
using that character set. This method is a fairly expensive operation and
produces a new string on each invocation... | getFullMessage | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | MIT |
public final String getShortMessage() {
byte[] raw = buffer;
int msgB = RawParseUtils.tagMessage(raw, 0);
if (msgB < 0) {
return ""; //$NON-NLS-1$
}
int msgE = RawParseUtils.endOfParagraph(raw, msgB);
int signatureStart = getSignatureStart();
if (signatureStart >= msgB && msgE > signatureStart) {
m... | Parse the tag message and return the first "line" of it.
<p>
The first line is everything up to the first pair of LFs. This is the
"oneline" format, suitable for output in a single line display.
<p>
This method parses and returns the message portion of the tag buffer,
after taking the tag's character set into account a... | getShortMessage | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | MIT |
private Charset guessEncoding() {
try {
return RawParseUtils.parseEncoding(buffer);
} catch (IllegalCharsetNameException | UnsupportedCharsetException e) {
return UTF_8;
}
} | Parse the tag message and return the first "line" of it.
<p>
The first line is everything up to the first pair of LFs. This is the
"oneline" format, suitable for output in a single line display.
<p>
This method parses and returns the message portion of the tag buffer,
after taking the tag's character set into account a... | guessEncoding | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | MIT |
public final RevObject getObject() {
return object;
} | Get a reference to the object this tag was placed on.
<p>
Note that the returned object has only been looked up (see
{@link org.eclipse.jgit.revwalk.RevWalk#lookupAny(AnyObjectId, int)}. To
access the contents it needs to be parsed, see
{@link org.eclipse.jgit.revwalk.RevWalk#parseHeaders(RevObject)} and
{@link org.ecl... | getObject | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | MIT |
public final String getTagName() {
return tagName;
} | Get the name of this tag, from the tag header.
@return name of the tag, according to the tag header. | getTagName | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | MIT |
public final byte[] getRawBuffer() {
return buffer;
} | Obtain the raw unparsed tag body (<b>NOTE - THIS IS NOT A COPY</b>).
<p>
This method is exposed only to provide very fast, efficient access to
this tag's message buffer. Applications relying on this buffer should be
very careful to ensure they do not modify its contents during their use
of it.
@return the raw unparsed... | getRawBuffer | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | MIT |
public final void disposeBody() {
buffer = null;
} | Discard the message buffer to reduce memory usage.
<p>
After discarding the memory usage of the {@code RevTag} is reduced to
only the {@link #getObject()} pointer and {@link #getTagName()}.
Accessing other properties such as {@link #getTaggerIdent()} or either
message function requires reloading the buffer by invoking
... | disposeBody | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevTag.java | MIT |
public ObjectReader getObjectReader() {
return reader;
} | Get the reader this walker is using to load objects.
@return the reader this walker is using to load objects. | getObjectReader | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java | MIT |
@Override
public void close() {
if (closeReader) {
reader.close();
}
} | {@inheritDoc}
<p>
Release any resources used by this walker's reader.
<p>
A walker that has been released can be used again, but may need to be
released after the subsequent usage.
@since 4.0 | close | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java | MIT |
public boolean hasRevSort(RevSort sort) {
return sorting.contains(sort);
} | Check whether the provided sorting strategy is enabled.
@param sort
a sorting strategy to look for.
@return true if this strategy is enabled, false otherwise | hasRevSort | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java | MIT |
public boolean isFirstParent() {
return firstParent;
} | @return whether only first-parent links should be followed when walking.
@since 5.5 | isFirstParent | java | theonedev/onedev | server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.