(defun vc-git--literal-pathspec (file)
"Prepend :(literal) path magic to FILE."
;; Good example of file name that needs this: "test[56].xx".
- (and file (concat ":(literal)" (file-local-name file))))
+ (let ((lname (file-local-name file)))
+ ;; Expand abbreviated file names.
+ (when (file-name-absolute-p lname)
+ (setq lname (expand-file-name lname)))
+ (and file (concat ":(literal)" lname))))
(defun vc-git--literal-pathspecs (files)
"Prepend :(literal) path magic to FILES."
;; here, this way the *vc-diff* buffer is setup correctly, so
;; relative file names work.
(let ((default-directory rootdir))
- (vc-diff-internal
- t (list backend (list (expand-file-name rootdir)) working-revision) nil nil
- (called-interactively-p 'interactive))))))
+ (vc-diff-internal
+ t (list backend (list rootdir) working-revision) nil nil
+ (called-interactively-p 'interactive))))))
;;;###autoload
(defun vc-root-dir ()
(setq backend (vc-responsible-backend rootdir))
(unless backend
(error "Directory is not version controlled")))
- (setq default-directory (expand-file-name rootdir))
- (vc-print-log-internal backend (list default-directory) revision revision limit
+ (setq default-directory rootdir)
+ (vc-print-log-internal backend (list rootdir) revision revision limit
(when with-diff 'with-diff))))
;;;###autoload