From 2b62b2a019b488110901aeff08957c7d903e1588 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Thu, 26 Aug 2021 04:44:21 +0300 Subject: [PATCH] Make sure to remove the remote specification before adding :(literal) * lisp/vc/vc-git.el (vc-git--literal-pathspec): Make sure to remove the remote specification from the file name (bug#50175, bug#39452). --- lisp/vc/vc-git.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 935dc8b9aee..779326be3fd 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -245,7 +245,7 @@ included in the completions." (defun vc-git--literal-pathspec (pathspec) "Prepend :(literal) path magic to PATHSPEC." ;; Good example of PATHSPEC that needs this: "test[56].xx". - (and pathspec (concat ":(literal)" pathspec))) + (and pathspec (concat ":(literal)" (file-local-name pathspec)))) (defun vc-git--literal-pathspecs (pathspecs) "Prepend :(literal) path magic to PATHSPECS." -- 2.39.2