GNU bug report logs - #39452
[PATCH] vc-git-state fails for filenames with wildcards

Previous Next

Package: emacs;

Reported by: Wolfgang Scherer <Wolfgang.Scherer <at> gmx.de>

Date: Thu, 6 Feb 2020 14:00:02 UTC

Severity: normal

Tags: patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #85 received at 39452 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, Noam Postavsky <npostavs <at> gmail.com>,
 39452 <at> debbugs.gnu.org, Wolfgang.Scherer <at> gmx.de
Subject: Re: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards
Date: Fri, 27 Aug 2021 09:05:31 +0300
>> 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"))




This bug report was last modified 3 years and 314 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.