unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 3572613 2/2: Fix vc-git-state for filenames with wildcards
       [not found] ` <20210815012355.96FE620B72@vcs0.savannah.gnu.org>
@ 2021-08-15 11:00   ` Lars Ingebrigtsen
  2021-08-16  0:35     ` Dmitry Gutov
  2021-08-16 23:26   ` João Távora
  1 sibling, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-15 11:00 UTC (permalink / raw)
  To: emacs-devel; +Cc: Wolfgang Scherer

dgutov@yandex.ru (Dmitry Gutov) writes:

>     Fix vc-git-state for filenames with wildcards

I'm guessing this change led to this test failure:

1 unexpected results:
   FAILED  vc-test-git01-register

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: master 3572613 2/2: Fix vc-git-state for filenames with wildcards
  2021-08-15 11:00   ` master 3572613 2/2: Fix vc-git-state for filenames with wildcards Lars Ingebrigtsen
@ 2021-08-16  0:35     ` Dmitry Gutov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Gutov @ 2021-08-16  0:35 UTC (permalink / raw)
  To: Lars Ingebrigtsen, emacs-devel; +Cc: Wolfgang Scherer

On 15.08.2021 14:00, Lars Ingebrigtsen wrote:
> I'm guessing this change led to this test failure:
> 
> 1 unexpected results:
>     FAILED  vc-test-git01-register

Thanks, Lars. Should be fixed now (as well as one other problem that 
wasn't caught by tests).

The latter indicates a certain brittleness of the change (combined with 
the existing VC code), so I'd ask everyone to be on lookup for breakages 
in other commands, perhaps less frequently used one (breakage like "flat 
out doesn't work anymore").



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: master 3572613 2/2: Fix vc-git-state for filenames with wildcards
       [not found] ` <20210815012355.96FE620B72@vcs0.savannah.gnu.org>
  2021-08-15 11:00   ` master 3572613 2/2: Fix vc-git-state for filenames with wildcards Lars Ingebrigtsen
@ 2021-08-16 23:26   ` João Távora
  2021-08-17  0:33     ` Dmitry Gutov
  1 sibling, 1 reply; 4+ messages in thread
From: João Távora @ 2021-08-16 23:26 UTC (permalink / raw)
  To: emacs-devel; +Cc: Dmitry Gutov, Wolfgang Scherer

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




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: master 3572613 2/2: Fix vc-git-state for filenames with wildcards
  2021-08-16 23:26   ` João Távora
@ 2021-08-17  0:33     ` Dmitry Gutov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Gutov @ 2021-08-17  0:33 UTC (permalink / raw)
  To: João Távora, emacs-devel; +Cc: Wolfgang Scherer

On 17.08.2021 02:26, João Távora wrote:
> 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)

Thanks for the report.

> 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.

Should be fixed now, but with a different change.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-17  0:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210815012353.12994.8977@vcs0.savannah.gnu.org>
     [not found] ` <20210815012355.96FE620B72@vcs0.savannah.gnu.org>
2021-08-15 11:00   ` master 3572613 2/2: Fix vc-git-state for filenames with wildcards Lars Ingebrigtsen
2021-08-16  0:35     ` Dmitry Gutov
2021-08-16 23:26   ` João Távora
2021-08-17  0:33     ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).