Commit 459b669b authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Fix failures of vc-find-revision with non-ASCII file names

* lisp/vc/vc.el (vc-find-revision): Instead of binding
coding-system-for-write, make the buffer-file-coding-system of
the temporary buffer be no-conversion.  This avoids the
unwanted side effect of not encoding the command-line
arguments of the VCS commands invoked by the backend.
parent e9ff1905
Pipeline #716 passed with stage
in 26 minutes and 14 seconds
......@@ -1966,10 +1966,13 @@ Use BACKEND as the VC backend if specified."
(with-current-buffer filebuf
(let ((failed t))
(let ((coding-system-for-read 'no-conversion)
(coding-system-for-write 'no-conversion))
(let ((coding-system-for-read 'no-conversion))
(with-temp-file filename
(let ((outbuf (current-buffer)))
;; We will read the backend's output with no
;; conversions, so we should also save the
;; temporary file with no encoding conversions.
(setq buffer-file-coding-system 'no-conversion)
;; Change buffer to get local value of
;; vc-checkout-switches.
(with-current-buffer filebuf
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment