all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: emacs-devel@gnu.org
Cc: Dmitry Gutov <dgutov@yandex.ru>,
	Wolfgang Scherer <wolfgang.scherer@gmx.de>
Subject: Re: master 3572613 2/2: Fix vc-git-state for filenames with wildcards
Date: Tue, 17 Aug 2021 00:26:44 +0100	[thread overview]
Message-ID: <87a6lhynrf.fsf@gmail.com> (raw)
In-Reply-To: <20210815012355.96FE620B72@vcs0.savannah.gnu.org> (Dmitry Gutov's message of "Sat, 14 Aug 2021 21:23:55 -0400 (EDT)")

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




  parent reply	other threads:[~2021-08-16 23:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
2021-08-17  0:33     ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a6lhynrf.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=wolfgang.scherer@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.