[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d2ad64b: Move the expansion of abbreviated names to vc-git.el
From: |
Dmitry Gutov |
Subject: |
master d2ad64b: Move the expansion of abbreviated names to vc-git.el |
Date: |
Mon, 30 Aug 2021 19:48:20 -0400 (EDT) |
branch: master
commit d2ad64b7a524450bd1a4f59a5e0801abb0637b32
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Move the expansion of abbreviated names to vc-git.el
* lisp/vc/vc-git.el (vc-git--literal-pathspec):
Perform the expansion of abbreviated file names here instead
(bug#39452).
* lisp/vc/vc.el (vc-root-diff, vc-print-root-log):
Undo the recent change.
---
lisp/vc/vc-git.el | 6 +++++-
lisp/vc/vc.el | 10 +++++-----
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 1cd200c..a5431ab 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -245,7 +245,11 @@ included in the completions."
(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."
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 38204ef..8036be3 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2055,9 +2055,9 @@ saving the buffer."
;; 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 ()
@@ -2603,8 +2603,8 @@ with its diffs (if the underlying VCS supports that)."
(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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master d2ad64b: Move the expansion of abbreviated names to vc-git.el,
Dmitry Gutov <=