Subject: bug#59962: 29.0.60; vc commands fail in diff-mode

From: Daniel Martín <[email-masked]>
Date: Sun, 11 Dec 2022 17:46:47 +0100

Sven Joachim <[email-masked]> writes:

> As a distribution maintainer, I find myself working with
> version-controlled patches which Emacs visits in diff-mode.
> Unfortunately, there is a bad interaction between diff-mode and vc,
> which makes all vc commands fail.  This is what I got on C-x v l:
>
> ,----
> | Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
> |   file-truename(nil)
> |   find-buffer-visiting(nil)
> |   vc-buffer-sync-fileset((Git (nil nil nil nil) nil nil patch) t)
> |   vc-diff(nil t)
> |   funcall-interactively(vc-diff nil t)
> |   call-interactively(vc-diff nil nil)
> |   command-execute(vc-diff)
> `----
>

Could you detail the steps to reproduce this issue (preferably from
emacs -Q)?  I've tried C-x v l on a few Git-version-controlled .patch
files (in Diff mode) but I couldn't reproduce the error.  Thanks.