Subject: bug#78987: 30.1; Unable to create new Git repository in Dired mode

From: Eli Zaretskii <[email-masked]>
Date: Sun, 13 Jul 2025 10:54:35 +0300

> Cc: [email-masked]
> From: Juri Linkov <[email-masked]>
> Date: Sun, 13 Jul 2025 09:58:59 +0300
> 
> >  (defun dired-vc-deduce-fileset
> >      (&optional state-model-only-files not-state-changing)
> > -  (let ((backend (vc-responsible-backend default-directory))
> > -        (files (dired-get-marked-files nil nil nil nil t)))
> > +  (let* ((files (dired-get-marked-files nil nil nil nil t))
> > +         (backend (or (vc-responsible-backend default-directory t)
> > +                      (vc-backend-for-registration (car files)))))
> 
> The original recipe still fails with the same error.
> Shouldn't 'vc-responsible-backend' be wrapped with
> 'ignore-errors' in 'dired-vc-deduce-fileset'?

There's no need for ignore-errors; instead, vc-responsible-backend
should be called with the second argument NO-ERROR non-nil.

The original patch did precisely that, so it looks like some snafu
when applying the patch; now fixed.