diff options
| author | Richard Stallman | 2019-10-13 21:42:53 -0400 |
|---|---|---|
| committer | Eli Zaretskii | 2019-10-26 12:46:12 +0300 |
| commit | 626e0a6aad6b0f3c7348f37c9b2c9854b06b449b (patch) | |
| tree | 3d80664a42d1ee86a05be25d96266b27b8c4e697 | |
| parent | a0f7ea599919f967331173fdde2b87e50c88c4b7 (diff) | |
| download | emacs-626e0a6aad6b0f3c7348f37c9b2c9854b06b449b.tar.gz emacs-626e0a6aad6b0f3c7348f37c9b2c9854b06b449b.zip | |
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'.
| -rw-r--r-- | lisp/vc/vc-dispatcher.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index 40c392b21de..bf238dedbb8 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.") | |||
| 267 | ;; FIXME what about file names with spaces? | 267 | ;; FIXME what about file names with spaces? |
| 268 | (if (not filelist) "." (mapconcat 'identity filelist " "))) | 268 | (if (not filelist) "." (mapconcat 'identity filelist " "))) |
| 269 | 269 | ||
| 270 | (defcustom vc-tor nil | ||
| 271 | "If non-nil, communicate with the repository site via Tor." | ||
| 272 | :type 'boolean | ||
| 273 | :group 'vc) | ||
| 274 | |||
| 270 | ;;;###autoload | 275 | ;;;###autoload |
| 271 | (defun vc-do-command (buffer okstatus command file-or-list &rest flags) | 276 | (defun vc-do-command (buffer okstatus command file-or-list &rest flags) |
| 272 | "Execute a slave command, notifying user and checking for errors. | 277 | "Execute a slave command, notifying user and checking for errors. |
| @@ -295,7 +300,8 @@ case, and the process object in the asynchronous case." | |||
| 295 | ;; due to potential truncation of long messages. | 300 | ;; due to potential truncation of long messages. |
| 296 | (message-truncate-lines t) | 301 | (message-truncate-lines t) |
| 297 | (full-command | 302 | (full-command |
| 298 | (concat (if (string= (substring command -1) "\n") | 303 | (concat (if vc-tor "torsocks " "") |
| 304 | (if (string= (substring command -1) "\n") | ||
| 299 | (substring command 0 -1) | 305 | (substring command 0 -1) |
| 300 | command) | 306 | command) |
| 301 | " " (vc-delistify flags) | 307 | " " (vc-delistify flags) |