bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#39452: [PATCH] vc-git-state fails for filenames with wildcards


From: Juri Linkov
Subject: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards
Date: Fri, 27 Aug 2021 09:05:31 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> If we've seen one piece of code break here already, then perhaps
>> reverting and moving to the other (safer, but more invasive) approach is
>> the right way to go.
>
> Fair enough.
>
> Pushed the other patch with a couple of small tweaks.

This broke vc-rename-file that now fails with

  (error Failed (status 128): git --no-pager mv -f -- 
:(literal)/tmp/gitrepo/subdir/file1 :(literal)/tmp/gitrepo/subdir/file2)
  fatal: bad source, source=subdir/:(literal)/tmp/gitrepo/subdir/file1, 
destination=subdir/:(literal)/tmp/gitrepo/subdir/file2

Can be fixed with

diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 02ca022ad4..88e015fc9d 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1559,7 +1559,7 @@ vc-git-delete-file
   (vc-git-command nil 0 (vc-git--literal-pathspecs file) "rm" "-f" "--"))
 
 (defun vc-git-rename-file (old new)
-  (vc-git-command nil 0 (vc-git--literal-pathspecs (list old new)) "mv" "-f" 
"--"))
+  (vc-git-command nil 0 (list old new) "mv" "-f" "--"))
 
 (defun vc-git-mark-resolved (files)
   (vc-git-command nil 0 (vc-git--literal-pathspecs files) "add"))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]