summaryrefslogtreecommitdiff
path: root/lisp/vc/vc.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/vc/vc.el')
-rw-r--r--lisp/vc/vc.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index e39d3d8b37c..a5c866d7503 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1996,10 +1996,13 @@ Saves the buffer to the file."
(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