From d9143287b778deba259cdd9d7db0a6aaba558eb2 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Tue, 19 May 2020 07:17:24 +0200 Subject: Enable git wire protocol version 2 on server side per default Bug: 563145 Change-Id: Id5030c2b85466da0a8ccf3d78ae78df16d64ffc5 Signed-off-by: David Ostrovsky --- org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'org.eclipse.jgit') 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 afe4d3fd9f..5205ca9a9a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java @@ -723,7 +723,8 @@ public class UploadPack { } private boolean useProtocolV2() { - return ProtocolVersion.V2.equals(transferConfig.protocolVersion) + return (transferConfig.protocolVersion == null + || ProtocolVersion.V2.equals(transferConfig.protocolVersion)) && clientRequestedV2; } -- cgit v1.2.3