Browse Source

Expose the filter blob limit in UploadPack

Similar to UploadPack.getDepth() to know the shallow clone depth, expose
the user-specified filter blob limit for partial clones.

Change-Id: I04bde06862a1cf8a9862d950c15023c49d16a2a6
Signed-off-by: Terry Parker <tparker@google.com>
stable-5.4
Terry Parker 6 years ago
parent
commit
875dccf33c
  1. 14
      org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java

14
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java

@ -1525,6 +1525,20 @@ public class UploadPack {
return currentRequest.getDepth();
}
/**
* Returns the filter blob limit for the current request. Valid only after
* calling recvWants(). A limit -1 means no limit.
*
* @return filter blob limit requested by the client, or -1 if no limit
* @since 5.3
*/
public long getFilterBlobLimit() {
if (currentRequest == null) {
throw new RequestNotYetReadException();
}
return currentRequest.getFilterBlobLimit();
}
/**
* Get the user agent of the client.
* <p>

Loading…
Cancel
Save