emacs-devel
[Top][All Lists]
Advanced

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

Re: master 3572613 2/2: Fix vc-git-state for filenames with wildcards


From: João Távora
Subject: Re: master 3572613 2/2: Fix vc-git-state for filenames with wildcards
Date: Tue, 17 Aug 2021 00:26:44 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

dgutov@yandex.ru (Dmitry Gutov) writes:

> branch: master
> commit 3572613550f5d1d0b3392dbc809b32f3989e2981
> Author: Wolfgang Scherer <wolfgang.scherer@gmx.de>
> Commit: Dmitry Gutov <dgutov@yandex.ru><
>
>     Fix vc-git-state for filenames with wildcards
>     
>     * lisp/vc/vc-git.el: (vc-git--literal-pathspec-inner),
>     (vc-git--literal-pathspec), (vc-git--literal-pathspecs) new functions
>     to add ":(literal)" pathspec magic (bug#39452).

After git bisecting, this recent commit seems to be to blame for the
the recent breakage of vc-region-history.  Select any bit of a file and
try M-x vc-region-history:

   Debugger entered--Lisp error: (wrong-type-argument sequencep 47)
     vc-git--literal-pathspec(47)
     mapcar(vc-git--literal-pathspec 
"/home/capitaomorte/Source/Emacs/emacs/lisp/minibuffer.el")
     
vc-git--literal-pathspecs("/home/capitaomorte/Source/Emacs/emacs/lisp/minibuffer.el")
     vc-git-diff("/home/capitaomorte/Source/Emacs/emacs/lisp/minibuffer.el" 
"HEAD" nil #<buffer  *temp*>)
     apply(vc-git-diff ("/home/capitaomorte/Source/Emacs/emacs/lisp/minibuf..." 
"HEAD" nil #<buffer  *temp*>))
     vc-call-backend(git diff 
"/home/capitaomorte/Source/Emacs/emacs/lisp/minibuf..." "HEAD" nil #<buffer  
*temp*>)
     
vc-git-region-history("/home/capitaomorte/Source/Emacs/emacs/lisp/minibuf..." 
#<buffer *VC-history*> 1486 1491)
     apply(vc-git-region-history 
("/home/capitaomorte/Source/Emacs/emacs/lisp/minibuf..." #<buffer *VC-history*> 
1486 1491))
     vc-call-backend(Git region-history 
"/home/capitaomorte/Source/Emacs/emacs/lisp/minibuf..." #<buffer *VC-history*> 
1486 1491)
     vc-region-history(71072 71289)
     funcall-interactively(vc-region-history 71072 71289)
     call-interactively(vc-region-history record nil)
     command-execute(vc-region-history record)
     execute-extended-command(nil "vc-region-history" "vc-region")
     funcall-interactively(execute-extended-command nil "vc-region-history" 
"vc-region")
     call-interactively(execute-extended-command nil nil)
     command-execute(execute-extended-command)

This silly patch seems to fix it, tho I don't know what a pathspec even
is, and you may know what's on.

   diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
   index ffe1e6832c..6249f92b1c 100644
   --- a/lisp/vc/vc-git.el
   +++ b/lisp/vc/vc-git.el
   @@ -249,7 +249,9 @@ vc-git--literal-pathspec
    
    (defun vc-git--literal-pathspecs (pathspecs)
      "Prepend :(literal) path magic to PATHSPECS."
   -  (mapcar #'vc-git--literal-pathspec pathspecs))
   +  (mapcar #'vc-git--literal-pathspec (if (sequencep pathspecs)
   +                                         pathspecs
   +                                       (list pathspecs))))
    
    (defun vc-git-registered (file)
      "Check whether FILE is registered with git."

Please fix this: vc-region-history is one of my favourite commands.

João




reply via email to

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