UploadPack: Fix want-is-satisfied test
okToGiveUpImp() has been missing a ! for a long time. This loop over wantAll() is looking for an object where wantSatisfied() returns false, because there is no common merge base present. Unfortunately it was missing a !, causing the loop to break and return false after at least one want was satisified. Bug: 301639 Change-Id: Ifdbe0b22c9cd0a9181546d090b4990d792d70c82 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
parent
2096c749c3
commit
a35c793b2d
|
@ -586,7 +586,7 @@ private boolean okToGiveUpImp() throws PackProtocolException {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
for (RevObject obj : wantAll) {
|
for (RevObject obj : wantAll) {
|
||||||
if (wantSatisfied(obj))
|
if (!wantSatisfied(obj))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue