diff options
author | Eli Zaretskii <eliz@gnu.org> | 2019-02-08 08:59:23 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2019-02-08 08:59:23 +0200 |
commit | 459b669b08d235a79ff4fa61b2d93e9a6229facd (patch) | |
tree | 5d856c6522a9a23b5075262b30a077fbac15ef89 /lisp | |
parent | e9ff19053139c149460fa8b1214c4012fc11cd0d (diff) | |
download | emacs-459b669b08d235a79ff4fa61b2d93e9a6229facd.tar.gz |
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.
(Bug#34350)
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/vc/vc.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 9925196f737..326284f4446 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1966,10 +1966,13 @@ Use BACKEND as the VC backend if specified." (with-current-buffer filebuf (let ((failed t)) (unwind-protect - (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 |