diff lisp/vc/diff.el @ 111999:1c6bd016193a

Fix 2010-11-22 change to diff.el. * vc/diff.el (diff-better-file-name): Function deleted. abbreviating file names causes problems with shell-quote-argument. (diff-no-select): Just use expand-file-name.
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 20 Dec 2010 08:20:25 +0800
parents b2c5606310f5
children 417b1e4d63cd
line wrap: on
line diff
--- a/lisp/vc/diff.el	Mon Dec 20 08:17:26 2010 +0800
+++ b/lisp/vc/diff.el	Mon Dec 20 08:20:25 2010 +0800
@@ -110,18 +110,10 @@
           tempfile))
     (file-local-copy file-or-buf)))
 
-(defun diff-better-file-name (file)
-  (if (bufferp file) file
-    (let ((rel (file-relative-name file))
-          (abbr (abbreviate-file-name (expand-file-name file))))
-      (if (< (length abbr) (length rel))
-          abbr
-        rel))))
-
 (defun diff-no-select (old new &optional switches no-async buf)
   ;; Noninteractive helper for creating and reverting diff buffers
-  (setq new (diff-better-file-name new)
-	old (diff-better-file-name old))
+  (unless (bufferp new) (setq new (expand-file-name new)))
+  (unless (bufferp old) (setq old (expand-file-name old)))
   (or switches (setq switches diff-switches)) ; If not specified, use default.
   (unless (listp switches) (setq switches (list switches)))
   (or buf (setq buf (get-buffer-create "*Diff*")))