# HG changeset patch
# User Manuel Jacob <me@manueljacob.de>
# Date 1588901457 -7200
#      Fri May 08 03:30:57 2020 +0200
# Node ID 320ffeb5f38633d0a4702154fba8c38ee136f3f0
# Parent  f5b322889bded576313b92ff641c238893d97f18
ssh: simplify and remove obsolete compatibility code

diff --git a/hggit/_ssh.py b/hggit/_ssh.py
--- a/hggit/_ssh.py
+++ b/hggit/_ssh.py
@@ -17,18 +17,10 @@
 
     class _Vendor(SSHVendor):
         def run_command(self, host, command, username=None, port=None):
-            if isinstance(command, basestring):
-                # 0.12.x dulwich sends the raw string
-                command = [command]
-            elif len(command) > 1:
-                # 0.11.x dulwich sends an array of [command arg1 arg2 ...], so
-                # we detect that here and reformat it back to what hg-git
-                # expects (e.g. "command 'arg1 arg2'")
-                command = [b"%s '%s'" % (command[0], b' '.join(command[1:]))]
+            assert isinstance(command, basestring)
             sshcmd = ui.config(b"ui", b"ssh", b"ssh")
             args = compat.sshargs(sshcmd, host, username, port)
-            cmd = b'%s %s %s' % (sshcmd, args,
-                                 compat.shellquote(b' '.join(command)))
+            cmd = b'%s %s %s' % (sshcmd, args, compat.shellquote(command))
             ui.debug(b'calling ssh: %s\n' % cmd)
             proc = subprocess.Popen(compat.quotecommand(cmd), shell=True,
                                     stdin=subprocess.PIPE,