[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 7791907c385: tramp-ssh-controlmaster-options shouldn't return nil
From: |
Michael Albinus |
Subject: |
master 7791907c385: tramp-ssh-controlmaster-options shouldn't return nil |
Date: |
Tue, 9 May 2023 11:05:46 -0400 (EDT) |
branch: master
commit 7791907c3852e6ec197352e1c3d3dd8487cc04f5
Author: Benson Chu <bensonchu457@gmail.com>
Commit: Michael Albinus <michael.albinus@gmx.de>
tramp-ssh-controlmaster-options shouldn't return nil
* lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options):
Should never return nil, but empty string.
Copyright-paperwork-exempt: yes
---
lisp/net/tramp-sh.el | 38 +++++++++++++++++++++-----------------
1 file changed, 21 insertions(+), 17 deletions(-)
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index d020615af07..49e6d2d7aa9 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4856,26 +4856,30 @@ Goes through the list `tramp-inline-compress-commands'."
(stringp tramp-ssh-controlmaster-options))
tramp-ssh-controlmaster-options)
+ ;; We can't auto-compute the options.
+ ((ignore-errors
+ (not (tramp-ssh-option-exists-p vec "ControlMaster=auto")))
+ "")
+
;; Determine the options.
(t (ignore-errors
;; ControlMaster and ControlPath options are introduced in OpenSSH 3.9.
- (when (tramp-ssh-option-exists-p vec "ControlMaster=auto")
- (concat
- "-o ControlMaster="
- (if (eq tramp-use-connection-share 'suppress)
- "no" "auto")
-
- " -o ControlPath="
- (if (eq tramp-use-connection-share 'suppress)
- "none"
- ;; Hashed tokens are introduced in OpenSSH 6.7.
- (if (tramp-ssh-option-exists-p vec "ControlPath=tramp.%C")
- "tramp.%%C" "tramp.%%r@%%h:%%p"))
-
- ;; ControlPersist option is introduced in OpenSSH 5.6.
- (when (and (not (eq tramp-use-connection-share 'suppress))
- (tramp-ssh-option-exists-p vec "ControlPersist=no"))
- " -o ControlPersist=no")))))))
+ (concat
+ "-o ControlMaster="
+ (if (eq tramp-use-connection-share 'suppress)
+ "no" "auto")
+
+ " -o ControlPath="
+ (if (eq tramp-use-connection-share 'suppress)
+ "none"
+ ;; Hashed tokens are introduced in OpenSSH 6.7.
+ (if (tramp-ssh-option-exists-p vec "ControlPath=tramp.%C")
+ "tramp.%%C" "tramp.%%r@%%h:%%p"))
+
+ ;; ControlPersist option is introduced in OpenSSH 5.6.
+ (when (and (not (eq tramp-use-connection-share 'suppress))
+ (tramp-ssh-option-exists-p vec "ControlPersist=no"))
+ " -o ControlPersist=no"))))))
(defun tramp-scp-strict-file-name-checking (vec)
"Return the strict file name checking argument of the local scp."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 7791907c385: tramp-ssh-controlmaster-options shouldn't return nil,
Michael Albinus <=