private final Set<ObjectId> clientShallowCommits;
- private final int shallowSince;
+ private final int deepenSince;
private final List<String> deepenNotRefs;
private FetchV2Request(List<ObjectId> peerHas,
TreeMap<String, ObjectId> wantedRefs, Set<ObjectId> wantsIds,
- Set<ObjectId> clientShallowCommits, int shallowSince,
+ Set<ObjectId> clientShallowCommits, int deepenSince,
List<String> deepenNotRefs, int depth, long filterBlobLimit,
boolean doneReceived, Set<String> options) {
this.peerHas = peerHas;
this.wantedRefs = wantedRefs;
this.wantsIds = wantsIds;
this.clientShallowCommits = clientShallowCommits;
- this.shallowSince = shallowSince;
+ this.deepenSince = deepenSince;
this.deepenNotRefs = deepenNotRefs;
this.depth = depth;
this.filterBlobLimit = filterBlobLimit;
* @return timestamp in seconds since the epoch, where to stop the shallow
* fetch/clone. Defaults to 0 if not set in the request.
*/
- int getShallowSince() {
- return shallowSince;
+ int getDeepenSince() {
+ return deepenSince;
}
/**
int depth;
- int shallowSince;
+ int deepenSince;
long filterBlobLimit = -1;
/**
* @param value
- * shallow since value received in a "deepen since" line
+ * Unix timestamp received in a "deepen since" line
* @return the builder
*/
- Builder setShallowSince(int value) {
- this.shallowSince = value;
+ Builder setDeepenSince(int value) {
+ this.deepenSince = value;
return this;
}
* @return shallow since value, sent before in a "deepen since" line. 0
* by default.
*/
- int getShallowSince() {
- return this.shallowSince;
+ int getDeepenSince() {
+ return this.deepenSince;
}
/**
*/
FetchV2Request build() {
return new FetchV2Request(peerHas, wantedRefs, wantsIds,
- clientShallowCommits, shallowSince, deepenNotRefs,
+ clientShallowCommits, deepenSince, deepenNotRefs,
depth, filterBlobLimit, doneReceived, options);
}
}
MessageFormat.format(JGitText.get().invalidDepth,
Integer.valueOf(parsedDepth)));
}
- if (reqBuilder.getShallowSince() != 0) {
+ if (reqBuilder.getDeepenSince() != 0) {
throw new PackProtocolException(
JGitText.get().deepenSinceWithDeepen);
}
} else if (line.equals(OPTION_DEEPEN_RELATIVE)) {
reqBuilder.addOption(OPTION_DEEPEN_RELATIVE);
} else if (line.startsWith("deepen-since ")) { //$NON-NLS-1$
- int parsedShallowSince = Integer.parseInt(line.substring(13));
- if (parsedShallowSince <= 0) {
+ int ts = Integer.parseInt(line.substring(13));
+ if (ts <= 0) {
throw new PackProtocolException(
MessageFormat.format(
JGitText.get().invalidTimestamp, line));
throw new PackProtocolException(
JGitText.get().deepenSinceWithDeepen);
}
- reqBuilder.setShallowSince(parsedShallowSince);
+ reqBuilder.setDeepenSince(ts);
} else if (transferConfig.isAllowFilter()
&& line.startsWith(OPTION_FILTER + ' ')) {
if (filterReceived) {
wantIds.addAll(req.getWantsIds());
clientShallowCommits = req.getClientShallowCommits();
depth = req.getDepth();
- shallowSince = req.getShallowSince();
+ shallowSince = req.getDeepenSince();
filterBlobLimit = req.getFilterBlobLimit();
deepenNotRefs = req.getDeepenNotRefs();
if (!req.getClientShallowCommits().isEmpty()) {
verifyClientShallow(req.getClientShallowCommits());
}
- if (req.getDepth() != 0 || req.getShallowSince() != 0
+ if (req.getDepth() != 0 || req.getDeepenSince() != 0
|| !req.getDeepenNotRefs().isEmpty()) {
shallowCommits = new ArrayList<>();
processShallow(shallowCommits, unshallowCommits, false);