[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-28 4afff51: Expand the full file name
From: |
Dmitry Gutov |
Subject: |
emacs-28 4afff51: Expand the full file name |
Date: |
Mon, 11 Oct 2021 09:44:05 -0400 (EDT) |
branch: emacs-28
commit 4afff515c870339bdb3fccab4175b063770eb4bf
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Expand the full file name
* lisp/vc/vc-git.el (vc-git--literal-pathspec):
Expand the full file name, not just the local part (bug#51112).
---
lisp/vc/vc-git.el | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index eca8d54..35c0838 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -242,15 +242,14 @@ included in the completions."
;;;###autoload (load "vc-git" nil t)
;;;###autoload (vc-git-registered file))))
+;; Good example of file name that needs this: "test[56].xx".
(defun vc-git--literal-pathspec (file)
"Prepend :(literal) path magic to FILE."
- ;; Good example of file name that needs this: "test[56].xx".
(when file
- (let ((lname (file-local-name file)))
- ;; Expand abbreviated file names.
- (when (file-name-absolute-p lname)
- (setq lname (expand-file-name lname)))
- (concat ":(literal)" lname))))
+ ;; Expand abbreviated file names.
+ (when (file-name-absolute-p file)
+ (setq file (expand-file-name file)))
+ (concat ":(literal)" (file-local-name file))))
(defun vc-git--literal-pathspecs (files)
"Prepend :(literal) path magic to FILES."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-28 4afff51: Expand the full file name,
Dmitry Gutov <=