[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 626e0a6 1/2: New defcustom 'vc-tor'
From: |
Eli Zaretskii |
Subject: |
master 626e0a6 1/2: New defcustom 'vc-tor' |
Date: |
Sat, 26 Oct 2019 05:58:17 -0400 (EDT) |
branch: master
commit 626e0a6aad6b0f3c7348f37c9b2c9854b06b449b
Author: Richard Stallman <address@hidden>
Commit: Eli Zaretskii <address@hidden>
New defcustom 'vc-tor'
* lisp/vc/vc-dispatcher.el (vc-tor): New user option.
(vc-do-command): If vc-tor is non-nil, use 'torsocks'.
---
lisp/vc/vc-dispatcher.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index 40c392b..bf238de 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -267,6 +267,11 @@ and is passed 3 arguments: the COMMAND, the FILES and the
FLAGS.")
;; FIXME what about file names with spaces?
(if (not filelist) "." (mapconcat 'identity filelist " ")))
+(defcustom vc-tor nil
+ "If non-nil, communicate with the repository site via Tor."
+ :type 'boolean
+ :group 'vc)
+
;;;###autoload
(defun vc-do-command (buffer okstatus command file-or-list &rest flags)
"Execute a slave command, notifying user and checking for errors.
@@ -295,7 +300,8 @@ case, and the process object in the asynchronous case."
;; due to potential truncation of long messages.
(message-truncate-lines t)
(full-command
- (concat (if (string= (substring command -1) "\n")
+ (concat (if vc-tor "torsocks " "")
+ (if (string= (substring command -1) "\n")
(substring command 0 -1)
command)
" " (vc-delistify flags)