summaryrefslogtreecommitdiff
path: root/lisp/vc
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2010-12-20 08:20:25 +0800
committerChong Yidong <cyd@stupidchicken.com>2010-12-20 08:20:25 +0800
commitf48fdaad21384149802191ee45a6e913fa32f4d9 (patch)
tree30fd14d8c53026abcf931676539e34a150ff2163 /lisp/vc
parent949752705efd6a4b7478623d41b3552f93e9596c (diff)
downloademacs-f48fdaad21384149802191ee45a6e913fa32f4d9.tar.gz
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.
Diffstat (limited to 'lisp/vc')
-rw-r--r--lisp/vc/diff.el12
1 files changed, 2 insertions, 10 deletions
diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el
index 752b12446fe..1f5f2d764d2 100644
--- a/lisp/vc/diff.el
+++ b/lisp/vc/diff.el
@@ -110,18 +110,10 @@ specified in `diff-switches' are passed to the diff command."
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*")))