aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2011-02-06 00:42:23 -0800
committerChris Aniszczyk <caniszczyk@gmail.com>2011-02-13 15:30:25 -0600
commitf9c9fe52266c7a64a6a72eb90287b6e872c142e9 (patch)
tree4b13b5a7af2309414b865c2acdbb9f111f2cfc23 /org.eclipse.jgit
parentd6b7139cd85f718fa241b51628835a21c5d81833 (diff)
downloadjgit-f9c9fe52266c7a64a6a72eb90287b6e872c142e9.tar.gz
jgit-f9c9fe52266c7a64a6a72eb90287b6e872c142e9.zip
UploadPack: Assume okToGiveUp is initially false
When negotiate() starts there is at least one want, but no haves, and thus no common base exists. Its not ok to give up yet, the client should try to find a common base with the server. Avoid scanning our history along the want chains until we have found at least one commit in common with the client, this will trigger okToGiveUp to be set to null, enabling okToGiveUp() to perform the scan. Bug: 301639 Change-Id: I98a82a5424fd4c9995924375c7910f76ca4f03af Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
index 52d7c37533..175ddbcba2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
@@ -415,6 +415,8 @@ public class UploadPack {
}
private boolean negotiate() throws IOException {
+ okToGiveUp = Boolean.FALSE;
+
ObjectId last = ObjectId.zeroId();
List<ObjectId> peerHas = new ArrayList<ObjectId>(64);
for (;;) {