[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ff2c4a8: Have Git backend actions accept nil filenames again
From: |
Dmitry Gutov |
Subject: |
master ff2c4a8: Have Git backend actions accept nil filenames again |
Date: |
Tue, 7 Sep 2021 19:33:47 -0400 (EDT) |
branch: master
commit ff2c4a8353b93fe02501e3c51d18963ec75e3b7b
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Have Git backend actions accept nil filenames again
* lisp/vc/vc-git.el (vc-git--literal-pathspec):
Move the nil check to the beginning (bug#50422).
---
lisp/vc/vc-git.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 037fbcb..5835b5b 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -245,11 +245,12 @@ 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".
- (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))))
+ (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))))
(defun vc-git--literal-pathspecs (files)
"Prepend :(literal) path magic to FILES."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master ff2c4a8: Have Git backend actions accept nil filenames again,
Dmitry Gutov <=