Browse Source

UploadPack: Tag non-commits SATISIFIED earlier

This gets non-commits out of the wantSatisfied() main loop by making
use of the cached SATISIFIED flag and its existing bypass.  Anything
that isn't a commit cannot be discovered by the have negotiation, so
its always assumed to be SATISIFIED by the server.

Bug: 301639
Change-Id: I1ef354fbf2e2ed44c9020a4069d7179f2159f19f
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
stable-0.12
Shawn O. Pearce 14 years ago
parent
commit
0fe7eeba04
  1. 8
      org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java

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

@ -499,6 +499,9 @@ public class UploadPack {
wantAll.add(obj);
}
if (!(obj instanceof RevCommit))
obj.add(SATISFIED);
if (obj instanceof RevTag) {
RevObject target = walk.peel(obj);
if (target instanceof RevCommit) {
@ -601,11 +604,6 @@ public class UploadPack {
if (want.has(SATISFIED))
return true;
if (!(want instanceof RevCommit)) {
want.add(SATISFIED);
return true;
}
walk.resetRetain(SAVE);
walk.markStart((RevCommit) want);
for (;;) {

Loading…
Cancel
Save