diff options
author | Thomas Wolf <thomas.wolf@paranor.ch> | 2020-11-03 23:33:19 +0100 |
---|---|---|
committer | Thomas Wolf <thomas.wolf@paranor.ch> | 2020-11-03 23:50:21 +0100 |
commit | d69fb4d4ac7bcf7d0d84109bba56cf944646fb24 (patch) | |
tree | 12a796e526b04e9207ef7f05b28d263154150053 /org.eclipse.jgit.ssh.apache/src/org/eclipse | |
parent | 5dcc46591aa1ad63f19e5240eff2cabe6bb9f306 (diff) | |
download | jgit-d69fb4d4ac7bcf7d0d84109bba56cf944646fb24.tar.gz jgit-d69fb4d4ac7bcf7d0d84109bba56cf944646fb24.zip |
Revert "Client-side protocol V2 support for fetching"
This reverts commit f802f06e7fd5a98f256b7b7727598491f563bf2f.
I had misunderstood how protocol V2 works. This implementation only
works if the negotiation during fetch is done in one round.
Fixing this is substantial work in BasePackFetchConnection. Basically
I think I'd have to change back negotiate to the V0 version, and have
a doFetch() that does
if protocol V2
doFetchV2()
else
doFetchV0()
with doFetchV0 the old code, and doFetchV2 completely new.
Plus there would need to be a HTTP test case requiring several
negotiation rounds.
This is a couple of days work at least, and I don't know when I will
have the time to revisit this. So although the rest of the code is
fine I prefer to back this out completely and not leave a only half
working implementation in the code for an indeterminate time.
Bug: 553083
Change-Id: Icbbbb09882b3b83f9897deac4a06d5f8dc99d84e
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.ssh.apache/src/org/eclipse')
-rw-r--r-- | org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSession.java | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSession.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSession.java index 5a50cc8f27..0fb0610b99 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSession.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSession.java @@ -24,7 +24,6 @@ import java.util.Collections; import java.util.EnumSet; import java.util.LinkedList; import java.util.List; -import java.util.Map; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; @@ -54,7 +53,7 @@ import org.eclipse.jgit.errors.TransportException; import org.eclipse.jgit.internal.transport.sshd.JGitSshClient; import org.eclipse.jgit.internal.transport.sshd.SshdText; import org.eclipse.jgit.transport.FtpChannel; -import org.eclipse.jgit.transport.RemoteSession2; +import org.eclipse.jgit.transport.RemoteSession; import org.eclipse.jgit.transport.SshConstants; import org.eclipse.jgit.transport.URIish; import org.eclipse.jgit.util.StringUtils; @@ -62,12 +61,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * An implementation of {@link org.eclipse.jgit.transport.RemoteSession - * RemoteSession} based on Apache MINA sshd. + * An implementation of {@link RemoteSession} based on Apache MINA sshd. * * @since 5.2 */ -public class SshdSession implements RemoteSession2 { +public class SshdSession implements RemoteSession { private static final Logger LOG = LoggerFactory .getLogger(SshdSession.class); @@ -292,15 +290,8 @@ public class SshdSession implements RemoteSession2 { @Override public Process exec(String commandName, int timeout) throws IOException { - return exec(commandName, Collections.emptyMap(), timeout); - } - - @Override - public Process exec(String commandName, Map<String, String> environment, - int timeout) throws IOException { @SuppressWarnings("resource") - ChannelExec exec = session.createExecChannel(commandName, null, - environment); + ChannelExec exec = session.createExecChannel(commandName); if (timeout <= 0) { try { exec.open().verify(); |