/** Objects on both sides, these don't have to be sent. */
private final Set<RevObject> commonBase = new HashSet<>();
- /** Shallow commits the client already has. */
- private Set<ObjectId> clientShallowCommits = new HashSet<>();
-
/** Commit time of the oldest common commit, in seconds. */
private int oldestTime;
currentRequest = req;
wantIds = req.getWantIds();
- clientShallowCommits = req.getClientShallowCommits();
options = req.getClientCapabilities();
if (req.getWantIds().isEmpty()) {
else
multiAck = MultiAck.OFF;
- if (!clientShallowCommits.isEmpty())
- verifyClientShallow(clientShallowCommits);
+ if (!req.getClientShallowCommits().isEmpty()) {
+ verifyClientShallow(req.getClientShallowCommits());
+ }
+
if (req.getDepth() != 0 || req.getDeepenSince() != 0) {
computeShallowsAndUnshallows(req, shallow -> {
pckOut.writeString("shallow " + shallow.name() + '\n'); //$NON-NLS-1$
});
pckOut.end();
}
- if (!clientShallowCommits.isEmpty())
- walk.assumeShallow(clientShallowCommits);
+
+ if (!req.getClientShallowCommits().isEmpty())
+ walk.assumeShallow(req.getClientShallowCommits());
sendPack = negotiate(req, accumulator);
accumulator.timeNegotiating += System.currentTimeMillis()
- negotiateStart;
// copying data back to class fields
options = req.getClientCapabilities();
wantIds = req.getWantIds();
- clientShallowCommits = req.getClientShallowCommits();
boolean sectionSent = false;
boolean mayHaveShallow = req.getDepth() != 0
pw.setUseCachedPacks(true);
}
pw.setUseBitmaps(
- req.getDepth() == 0 && clientShallowCommits.isEmpty());
- pw.setClientShallowCommits(clientShallowCommits);
+ req.getDepth() == 0
+ && req.getClientShallowCommits().isEmpty());
+ pw.setClientShallowCommits(req.getClientShallowCommits());
pw.setReuseDeltaCommits(true);
pw.setDeltaBaseAsOffset(options.contains(OPTION_OFS_DELTA));
pw.setThin(options.contains(OPTION_THIN_PACK));
pw.setShallowPack(req.getDepth(), unshallowCommits);
rw = new DepthWalk.RevWalk(walk.getObjectReader(), walkDepth);
((DepthWalk.RevWalk) rw).setDeepenSince(req.getDeepenSince());
- rw.assumeShallow(clientShallowCommits);
+ rw.assumeShallow(req.getClientShallowCommits());
}
if (wantAll.isEmpty()) {
- pw.preparePack(pm, wantIds, commonBase, clientShallowCommits);
+ pw.preparePack(pm, wantIds, commonBase,
+ req.getClientShallowCommits());
} else {
walk.reset();